fix: object referencing the same address issue (#25159)

* fix: variable reference to same address

* fix: object referencing same address issue

* fix: value error
This commit is contained in:
Kaviya Periyasamy 2021-04-03 11:30:49 +05:30 committed by GitHub
parent 2453b0cf6a
commit 2cef23d4c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -396,7 +396,9 @@ def safe_json_load(json_string):
snippet = json_string[start:end]
frappe.throw(_("Error in input data. Please check for any special characters near following input: <br> {}").format(snippet))
def validate_einvoice(validations, einvoice, errors=[]):
def validate_einvoice(validations, einvoice, errors=None):
if errors is None:
errors = []
for fieldname, field_validation in validations.items():
value = einvoice.get(fieldname, None)
if not value or value == "None":