mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-11-15 03:04:28 +00:00
Fix template for Article/Page
This commit is contained in:
parent
8df4be0602
commit
c3f308e622
1 changed files with 1 additions and 1 deletions
2
app.py
2
app.py
|
@ -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"]
|
||||||
|
|
Loading…
Reference in a new issue