Skip to content

Commit

Permalink
fix: incorrect user photo and group description cardinality
Browse files Browse the repository at this point in the history
  • Loading branch information
azmeuk committed Nov 28, 2023
1 parent 98e8aa9 commit 15124f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions canaille/core/templates/partial/users.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<a href="{{ url_for('core.account.profile_edition', edited_user=watched_user) }}">
{% if user.can_manage_users and watched_user.locked %}
<i class="lock circle big black icon" title="{% trans %}This account is locked{% endtrans %}"></i>
{% elif watched_user.photo and watched_user.photo[0] %}
{% elif watched_user.photo and watched_user.photo %}
<img class="ui avatar image" src="{{ url_for("core.account.photo", user=watched_user, field="photo") }}" alt="User photo">
{% else %}
<i class="user circle big black icon"></i>
Expand Down Expand Up @@ -55,7 +55,7 @@
{% if user.can_manage_groups %}
<td>
{% for group in watched_user.groups %}
<a class="ui label" href="{{ url_for('core.groups.group', group=group) }}"{% if group.description %} title="{{ group.description[0] }}"{% endif %}>
<a class="ui label" href="{{ url_for('core.groups.group', group=group) }}"{% if group.description %} title="{{ group.description }}"{% endif %}>
{{ group.display_name }}
</a>
{% endfor %}
Expand Down
2 changes: 1 addition & 1 deletion canaille/core/templates/profile_edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ <h2 class="ui center aligned header">
{% block photo_field scoped %}
{{ profile.render_field(profile_form.photo, display=false, class="photo-field") }}
{{ profile.render_field(profile_form.photo_delete, display=false, class="photo-delete-button") }}
{% set photo = edited_user.photo and edited_user.photo[0] %}
{% set photo = edited_user.photo and edited_user.photo %}
<label
class="ui small bordered image photo-content"
for="{{ profile_form.photo.id }}"
Expand Down

0 comments on commit 15124f2

Please sign in to comment.