Small fixes for notifications

Adds a link in the text of the notification, and fixes references to
notification type in the model
This commit is contained in:
Mouse Reeve 2023-12-09 08:09:22 -08:00
parent 48904fc60b
commit dd72013225
2 changed files with 5 additions and 3 deletions

View file

@ -249,7 +249,7 @@ def notify_user_on_user_import_complete(
if not instance.complete or "complete" not in update_fields:
return
Notification.objects.create(
user=instance.user, notification_type=Notification.USER_IMPORT
user=instance.user, notification_type=NotificationType.USER_IMPORT
)
@ -264,7 +264,7 @@ def notify_user_on_user_export_complete(
return
Notification.objects.create(
user=instance.user,
notification_type=Notification.USER_EXPORT,
notification_type=NotificationType.USER_EXPORT,
related_user_export=instance,
)

View file

@ -10,5 +10,7 @@
{% endblock %}
{% block description %}
{% blocktrans %}Your user import is complete.{% endblocktrans %}
{% url 'user-import' as import_url %}
{% blocktrans %}Your <a href="{{ import_url }}">user import</a> is complete.{% endblocktrans %}
{% endblock %}