match existing snapshots on url only, ignoring timestamp

This commit is contained in:
Nick Sweeting 2020-08-18 04:39:04 -04:00
parent f371032b71
commit 6e142e3531

View file

@ -48,7 +48,7 @@ def write_sql_link_details(link: Link, out_dir: str=OUTPUT_DIR) -> None:
from django.db import transaction from django.db import transaction
with transaction.atomic(): with transaction.atomic():
snap = Snapshot.objects.get(url=link.url, timestamp=link.timestamp) snap = Snapshot.objects.get(url=link.url)
snap.title = link.title snap.title = link.title
snap.tags = link.tags snap.tags = link.tags
snap.save() snap.save()