fix if to elif bug in index snapshot sql writing
This commit is contained in:
parent
43c471e4af
commit
fae2fdaf2b
1 changed files with 1 additions and 1 deletions
|
@ -35,7 +35,7 @@ def write_sql_main_index(links: List[Link], out_dir: str=OUTPUT_DIR) -> None:
|
|||
info = {k: v for k, v in all_urls.pop(snapshot.url)._asdict().items() if k in Snapshot.keys}
|
||||
snapshot.delete()
|
||||
Snapshot.objects.create(**info)
|
||||
if snapshot.url in all_urls:
|
||||
elif snapshot.url in all_urls:
|
||||
info = {k: v for k, v in all_urls.pop(snapshot.url)._asdict().items() if k in Snapshot.keys}
|
||||
snapshot.delete()
|
||||
Snapshot.objects.create(**info)
|
||||
|
|
Loading…
Reference in a new issue