Merge pull request #2104 from umap-project/fix-anonymous-author

fix: do not try to display author name/url for anonymous maps
This commit is contained in:
Yohan Boniface 2024-09-04 16:01:30 +02:00 committed by GitHub
commit 95cb396459
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -7,7 +7,9 @@
<div class="legend">
<a href="{{ map_inst.get_absolute_url }}">{{ map_inst.name }}</a>
{% with author=map_inst.get_author %}
<em>{% trans "by" %} <a href="{{ author.get_url }}">{{ author }}</a></em>
{% if author %}
<em>{% trans "by" %} <a href="{{ author.get_url }}">{{ author }}</a></em>
{% endif %}
{% endwith %}
</div>
</div>