mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-21 13:52:30 +02:00
create_or_update ArchiveResults from history instead of get_or_create
This commit is contained in:
@@ -61,7 +61,7 @@ def write_link_to_sql_index(link: Link):
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
result, _ = ArchiveResult.objects.get_or_create(
|
result, _ = ArchiveResult.objects.create_or_update(
|
||||||
snapshot_id=snapshot.id,
|
snapshot_id=snapshot.id,
|
||||||
extractor=extractor,
|
extractor=extractor,
|
||||||
start_ts=parse_date(entry.start_ts),
|
start_ts=parse_date(entry.start_ts),
|
||||||
@@ -75,8 +75,6 @@ def write_link_to_sql_index(link: Link):
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
print(result)
|
|
||||||
|
|
||||||
return snapshot
|
return snapshot
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user