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

@ -38,7 +38,8 @@ def search(text: str) -> List[str]:
file_paths = [p.decode() for p in rg.stdout.splitlines()]
timestamps = set()
for path in file_paths:
if ts := ts_regex.findall(path):
ts = ts_regex.findall(path)
if ts:
timestamps.add(ts[0])
snap_ids = [str(id) for id in Snapshot.objects.filter(timestamp__in=timestamps).values_list('pk', flat=True)]