fix snapshot getter in sql saving

This commit is contained in:
Nick Sweeting 2020-06-30 15:24:23 -04:00
parent 58701abf38
commit bc1f925542

View file

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