mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-06 07:47:53 +10:00
remove .old_id entirely and make ABID generation only happen once on initial save
This commit is contained in:
@@ -192,7 +192,6 @@ class Link:
|
||||
if extended:
|
||||
info.update({
|
||||
'snapshot_id': self.snapshot_id,
|
||||
'snapshot_old_id': self.snapshot_old_id,
|
||||
'snapshot_abid': self.snapshot_abid,
|
||||
|
||||
'link_dir': self.link_dir,
|
||||
@@ -266,16 +265,12 @@ class Link:
|
||||
@cached_property
|
||||
def snapshot(self):
|
||||
from core.models import Snapshot
|
||||
return Snapshot.objects.only('id', 'old_id', 'abid').get(url=self.url)
|
||||
return Snapshot.objects.only('id', 'abid').get(url=self.url)
|
||||
|
||||
@cached_property
|
||||
def snapshot_id(self):
|
||||
return str(self.snapshot.pk)
|
||||
|
||||
@cached_property
|
||||
def snapshot_old_id(self):
|
||||
return str(self.snapshot.old_id)
|
||||
|
||||
@cached_property
|
||||
def snapshot_abid(self):
|
||||
return str(self.snapshot.ABID)
|
||||
|
||||
Reference in New Issue
Block a user