fix: check is_rejected attribute

(cherry picked from commit 2ac2e02b2f)
This commit is contained in:
Kavin
2025-10-06 17:49:28 +05:30
committed by Mergify
parent f94f628884
commit bdf150bdf8

View File

@@ -1227,7 +1227,7 @@ class SerialBatchCreation:
def create_batch(self):
from erpnext.stock.doctype.batch.batch import make_batch
if self.is_rejected:
if hasattr(self, "is_rejected") and self.is_rejected:
bundle = frappe.db.get_value(
"Serial and Batch Bundle",
{