From 74a176ae0939bcd3d00570b747e712aa3fe7c0a2 Mon Sep 17 00:00:00 2001 From: Kenneth Hansen Date: Sun, 31 Oct 2021 13:26:03 +0100 Subject: [PATCH] Log queue viewed on user --- src/mail/viewsets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mail/viewsets.py b/src/mail/viewsets.py index 8c87e24..bf808eb 100644 --- a/src/mail/viewsets.py +++ b/src/mail/viewsets.py @@ -164,7 +164,7 @@ def get_message_mailscanner_report(self, request, pk=None): @action(methods=['get'], detail=False, permission_classes=[IsAdminUser], url_path='queue', url_name='message-queue') def get_queue(self, request): - DataLogEntry.objects.log_create(None, changes='User {} requested to view the mail queue'.format(request.user.email)) + DataLogEntry.objects.log_create(request.user, changes='User {} requested to view the mail queue'.format(request.user.email)) host_count = MailScannerHost.objects.count() store = PostqueueStore() store.load()