mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-01-07 11:25:49 +10:00
refactor: Avoid assigning tags directly when re-creating the snapshot from the json file
This commit is contained in:
@@ -100,6 +100,9 @@ class Snapshot(models.Model):
|
||||
@classmethod
|
||||
def from_json(cls, info: dict):
|
||||
info = {k: v for k, v in info.items() if k in cls.keys}
|
||||
if "tags" in info:
|
||||
# TODO: Handle tags
|
||||
info.pop("tags")
|
||||
return cls(**info)
|
||||
|
||||
def as_json(self, *args) -> dict:
|
||||
|
||||
Reference in New Issue
Block a user