feat: Remove walrus operator (we still need to support python3.7)

This commit is contained in:
Cristian
2020-12-06 12:23:02 -05:00
parent 8aee5c408a
commit 8d22ebf988
3 changed files with 8 additions and 2 deletions

View File

@@ -95,7 +95,8 @@ def index_links(links: Union[List[Link],None], out_dir: Path=OUTPUT_DIR):
from core.models import Snapshot, ArchiveResult
for link in links:
if snap := Snapshot.objects.filter(url=link.url).first():
snap = Snapshot.objects.filter(url=link.url).first()
if snap:
results = ArchiveResult.objects.indexable().filter(snapshot=snap)
log_index_started(link.url)
try: