Don't crash when there is no match
This commit is contained in:
parent
ea95c82b37
commit
fc0d6f114a
|
@ -283,10 +283,15 @@ def article_page(url_title: str) -> str | Response:
|
|||
|
||||
by_title = {hit["title"]: hit for hit in hits}
|
||||
|
||||
found = None
|
||||
if article_title in by_title:
|
||||
hit = by_title[article_title]
|
||||
try:
|
||||
found = get_diff(from_title, hit["title"], None)
|
||||
else:
|
||||
except NoMatch:
|
||||
pass
|
||||
|
||||
if not found:
|
||||
after = flask.request.args.get("after")
|
||||
if after:
|
||||
print(after)
|
||||
|
|
Loading…
Reference in a new issue