Skip to content

Commit

Permalink
refactor: ignore malformed json
Browse files Browse the repository at this point in the history
  • Loading branch information
ruthra-kumar committed Dec 13, 2024
1 parent 14a5779 commit 0a7b0b1
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,8 @@ def execute():
item_iterator = json.loads(doc.item_wise_tax_detail).items()
except AttributeError as e:
# This is stale data from 2009 found in a database
if json.loads(doc.item_wise_tax_detail) == 1:
# meaning: replace with an empty {}
needs_update = True
if isinstance(json.loads(doc.item_wise_tax_detail), int | float):
needs_update = False
else:
raise e
else:
Expand Down

0 comments on commit 0a7b0b1

Please sign in to comment.