mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-15 23:54:27 -04:00
refactor: Avoid assigning tags directly when re-creating the snapshot from the json file
This commit is contained in:
parent
ea84607b47
commit
e95f14d1d0
1 changed files with 3 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue