mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-09 12:21:57 -04:00
Fixed empty tags
This commit is contained in:
parent
bf09c6b40a
commit
4581ea956f
2 changed files with 4 additions and 5 deletions
|
@ -40,7 +40,8 @@ def write_link_to_sql_index(link: Link):
|
|||
while Snapshot.objects.filter(timestamp=info["timestamp"]).exists():
|
||||
info["timestamp"] = str(float(info["timestamp"]) + 1.0)
|
||||
|
||||
return Snapshot.objects.update_or_create(url=link.url, defaults=info)[0]
|
||||
Snapshot.objects.update_or_create(url=link.url, defaults=info)
|
||||
return Snapshot.objects.get(url=link.url)
|
||||
|
||||
|
||||
@enforce_types
|
||||
|
@ -72,9 +73,7 @@ def write_sql_link_details(link: Link, out_dir: Path=OUTPUT_DIR) -> None:
|
|||
tag_list = list(tag_set) or []
|
||||
|
||||
for tag in tag_list:
|
||||
# TODO check empty tags
|
||||
if snap.tags:
|
||||
snap.tags.add(tag)
|
||||
snap.tags.add(tag)
|
||||
snap.save()
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue