Do not send notifications to disabled users

This commit is contained in:
Raphael Michel
2019-07-10 09:00:30 +02:00
parent e687eee9f1
commit 22ce7a388d

View File

@@ -32,7 +32,7 @@ def notify(logentry_id: int):
# All users that have the permission to get the notification
users = logentry.event.get_users_with_permission(
notification_type.required_permission
).filter(notifications_send=True)
).filter(notifications_send=True, is_active=True)
if logentry.user:
users = users.exclude(pk=logentry.user.pk)