Fix template for Article/Page

This commit is contained in:
Thomas Sileo 2019-04-21 21:25:36 +02:00
parent 8df4be0602
commit c3f308e622

2
app.py
View file

@ -322,7 +322,7 @@ def domain(url):
@app.template_filter() @app.template_filter()
def url_or_id(d): def url_or_id(d):
if isinstance(d, dict): if isinstance(d, dict):
if ("url" in d) and isinstance(d["url"], str): if "url" in d:
return d["url"] return d["url"]
else: else:
return d["id"] return d["id"]