url_or_id template filter don't return not str url

This commit is contained in:
Fabio
2020-01-07 17:39:57 +01:00
parent 1f2a8f6da7
commit a327f1f5d7

View File

@@ -215,7 +215,7 @@ def format_timeago(val):
@filters.app_template_filter()
def url_or_id(d):
if isinstance(d, dict):
if "url" in d:
if "url" in d and isinstance(d["url"], str):
return d["url"]
else:
return d["id"]