Browse Source

refactor: Avoid assigning tags directly when re-creating the snapshot from the json file

Cristian 5 years ago
parent
commit
e95f14d1d0
1 changed files with 3 additions and 0 deletions
  1. 3 0
      archivebox/core/models.py

+ 3 - 0
archivebox/core/models.py

@@ -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: