Skip to content

Commit

Permalink
suppress warnings on data read as JSON/dict from DB instead of specia…
Browse files Browse the repository at this point in the history
…l obj
  • Loading branch information
daroczig committed Feb 14, 2024
1 parent 55d448d commit 032c75f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/sc_crawler/hashing.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
def hashrow(row, ignored=["inserted_at"]):
"""Return tuple of primary keys and hash of values except for the ignored columns."""
pks = sorted([key.name for key in inspect(row.__class__).primary_key])
rowdict = row.model_dump()
rowdict = row.model_dump(warnings=False)
rowkeys = tuple(rowdict.get(pk) for pk in pks)
for dropkey in [*ignored, *pks]:
rowdict.pop(dropkey, None)
Expand Down

0 comments on commit 032c75f

Please sign in to comment.