From 75e1bfd0a9008e597da0b688dbe3bc182115d7b0 Mon Sep 17 00:00:00 2001 From: Nick Sweeting Date: Thu, 18 Feb 2021 02:34:20 -0500 Subject: [PATCH] create_or_update ArchiveResults from history instead of get_or_create --- archivebox/index/sql.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/archivebox/index/sql.py b/archivebox/index/sql.py index d74b836c..98a74c97 100644 --- a/archivebox/index/sql.py +++ b/archivebox/index/sql.py @@ -61,7 +61,7 @@ def write_link_to_sql_index(link: Link): } ) else: - result, _ = ArchiveResult.objects.get_or_create( + result, _ = ArchiveResult.objects.create_or_update( snapshot_id=snapshot.id, extractor=extractor, start_ts=parse_date(entry.start_ts), @@ -75,8 +75,6 @@ def write_link_to_sql_index(link: Link): } ) - print(result) - return snapshot