Merge pull request #3224 from hughrun/move-fix

Pass correct user id in Move notification
This commit is contained in:
Mouse Reeve 2024-01-17 14:25:28 -08:00 committed by GitHub
commit 61a6ee29d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 3 deletions

View file

@ -23,7 +23,7 @@
<div class="notification is-warning">
<p>
{% id_to_username request.user.moved_to as username %}
{% id_to_username request.user.moved_to as username %}
{% blocktrans trimmed with moved_to=user.moved_to %}
<strong>You have moved your account</strong> to <a href="{{ moved_to }}">{{ username }}</a>
{% endblocktrans %}

View file

@ -14,7 +14,7 @@
{% block description %}
{% if related_user_moved_to %}
{% id_to_username request.user.moved_to as username %}
{% id_to_username related_user_moved_to as username %}
{% blocktrans trimmed %}
{{ related_user }} has moved to <a href="{{ related_user_moved_to }}">{{ username }}</a>
{% endblocktrans %}

View file

@ -125,7 +125,8 @@ def id_to_username(user_id):
name = parts[-1]
value = f"{name}@{domain}"
return value
return value
return "a new user account"
@register.filter(name="get_file_size")