[kemonoparty] fix deleting 'name' in orginal objects (#5103)

... when computing 'revision_hash'

regression caused by 3d68eda4

dict.copy() only creates a shallow copy
I know that and still managed to get I wrong ...
This commit is contained in:
Mike Fährmann
2024-01-25 20:30:37 +01:00
parent beacfa7436
commit c28475d325
2 changed files with 22 additions and 3 deletions

View File

@@ -240,7 +240,9 @@ class KemonopartyExtractor(Extractor):
rev.pop("added", None)
rev.pop("next", None)
rev.pop("prev", None)
rev["file"] = rev["file"].copy()
rev["file"].pop("name", None)
rev["attachments"] = [a.copy() for a in rev["attachments"]]
for a in rev["attachments"]:
a.pop("name", None)
return util.sha1(self._json_dumps(rev))