mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-14 18:51:21 +00:00
Merge pull request #48343 from aerele/validate_with_previous_doc
fix: consider empty string in previous doc validation
This commit is contained in:
@@ -68,7 +68,7 @@ class TransactionBase(StatusUpdater):
|
|||||||
frappe.throw(_("Invalid reference {0} {1}").format(reference_doctype, reference_name))
|
frappe.throw(_("Invalid reference {0} {1}").format(reference_doctype, reference_name))
|
||||||
|
|
||||||
for field, condition in fields:
|
for field, condition in fields:
|
||||||
if prevdoc_values[field] is not None and field not in self.exclude_fields:
|
if prevdoc_values[field] not in [None, ""] and field not in self.exclude_fields:
|
||||||
self.validate_value(field, condition, prevdoc_values[field], doc)
|
self.validate_value(field, condition, prevdoc_values[field], doc)
|
||||||
|
|
||||||
def get_prev_doc_reference_details(self, reference_names, reference_doctype, fields):
|
def get_prev_doc_reference_details(self, reference_names, reference_doctype, fields):
|
||||||
|
|||||||
Reference in New Issue
Block a user