mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-08 15:42:52 +00:00
refactor: ignore selective malformed json
This commit is contained in:
@@ -30,9 +30,8 @@ def execute():
|
|||||||
item_iterator = json.loads(doc.item_wise_tax_detail).items()
|
item_iterator = json.loads(doc.item_wise_tax_detail).items()
|
||||||
except AttributeError as e:
|
except AttributeError as e:
|
||||||
# This is stale data from 2009 found in a database
|
# This is stale data from 2009 found in a database
|
||||||
if json.loads(doc.item_wise_tax_detail) == 1:
|
if isinstance(json.loads(doc.item_wise_tax_detail), int | float):
|
||||||
# meaning: replace with an empty {}
|
needs_update = False
|
||||||
needs_update = True
|
|
||||||
else:
|
else:
|
||||||
raise e
|
raise e
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user