mirror of
https://github.com/pirate/ArchiveBox.git
synced 2025-08-29 17:19:53 +02:00
fix link creation
This commit is contained in:
@@ -29,7 +29,7 @@ def write_sql_main_index(links: List[Link], out_dir: str=OUTPUT_DIR) -> None:
|
|||||||
with transaction.atomic():
|
with transaction.atomic():
|
||||||
for link in links:
|
for link in links:
|
||||||
info = {k: v for k, v in link._asdict().items() if k in Snapshot.keys}
|
info = {k: v for k, v in link._asdict().items() if k in Snapshot.keys}
|
||||||
Snapshot.objects.update_or_create(url=url, defaults=info)
|
Snapshot.objects.update_or_create(url=link.url, defaults=info)
|
||||||
|
|
||||||
@enforce_types
|
@enforce_types
|
||||||
def write_sql_link_details(link: Link, out_dir: str=OUTPUT_DIR) -> None:
|
def write_sql_link_details(link: Link, out_dir: str=OUTPUT_DIR) -> None:
|
||||||
|
Reference in New Issue
Block a user