Skip to content

Commit

Permalink
moved the EnhancedJSONEncoder up as otherwise export_for_status w…
Browse files Browse the repository at this point in the history
…on't be able to serialise the dict
  • Loading branch information
CommanderStorm committed Jun 28, 2024
1 parent 745c26c commit 5379196
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/processors/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ def export_for_status(data: dict, path: str) -> None:
"""Generate hashes for the contents of data"""
export_data = []
for _id, entry in data.items():
hashed_entry = hash(json.dumps(entry, sort_keys=True))
hashed_entry = hash(json.dumps(entry, sort_keys=True, cls=EnhancedJSONEncoder))
export_data.append((_id, hashed_entry))
with open(path, "w", encoding="utf-8") as file:
json.dump(export_data, file, cls=EnhancedJSONEncoder)
json.dump(export_data, file)


def export_for_api(data: dict, path: str) -> None:
Expand Down

0 comments on commit 5379196

Please sign in to comment.