mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-12 22:25:44 -04:00
update REST API and Admin UI to use new id and old_id exclusively
Some checks failed
Build Homebrew package / build (push) Has been cancelled
Run linters / lint (push) Has been cancelled
Build Debian package / build (push) Has been cancelled
Build Docker image / buildx (push) Has been cancelled
Build Pip package / build (push) Has been cancelled
Run tests / python_tests (ubuntu-22.04, 3.11) (push) Has been cancelled
Run tests / docker_tests (push) Has been cancelled
Some checks failed
Build Homebrew package / build (push) Has been cancelled
Run linters / lint (push) Has been cancelled
Build Debian package / build (push) Has been cancelled
Build Docker image / buildx (push) Has been cancelled
Build Pip package / build (push) Has been cancelled
Run tests / python_tests (ubuntu-22.04, 3.11) (push) Has been cancelled
Run tests / docker_tests (push) Has been cancelled
This commit is contained in:
parent
344e902fc6
commit
c4ef2993b2
3 changed files with 26 additions and 25 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue