cgit/lister: Fix error when a missing version is not provided

Related to [1]

[1] https://sentry.softwareheritage.org/share/issue/afe7279f9f2d4bdc86f4b1b068a281a5/
This commit is contained in:
Antoine R. Dumont (@ardumont) 2021-05-28 12:09:56 +02:00
parent 9ca5295a40
commit 729e76168f
No known key found for this signature in database
GPG key ID: 52E2E9840D10C3B8

View file

@ -112,10 +112,7 @@ class CGitLister(StatelessLister[Repositories]):
repo_url = base_url
span = tr.find("span", {"class": re.compile("age-")})
if span:
last_updated_date = span["title"]
else:
last_updated_date = None
last_updated_date = span.get("title") if span else None
page_results.append(
{