mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-05 15:27:53 +10:00
update REST API and Admin UI to use new id and old_id exclusively
This commit is contained in:
@@ -163,6 +163,10 @@ class Snapshot(ABIDModel):
|
||||
title = self.title or '-'
|
||||
return f'[{self.timestamp}] {self.url[:64]} ({title[:64]})'
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
super().save(*args, **kwargs)
|
||||
assert str(self.id) == str(self.abid.uuid) == str(self.uuid)
|
||||
|
||||
@classmethod
|
||||
def from_json(cls, info: dict):
|
||||
info = {k: v for k, v in info.items() if k in cls.keys}
|
||||
@@ -391,7 +395,7 @@ class ArchiveResult(ABIDModel):
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
super().save(*args, **kwargs)
|
||||
assert str(self.id) == str(self.abid.uuid)
|
||||
assert str(self.id) == str(self.abid.uuid) == str(self.uuid)
|
||||
|
||||
@property
|
||||
def uuid(self):
|
||||
|
||||
Reference in New Issue
Block a user