Skip to content

Commit

Permalink
Log only audit once
Browse files Browse the repository at this point in the history
  • Loading branch information
KHIT93 committed Oct 31, 2021
1 parent 74a176a commit 6b867fb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mail/viewsets.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ 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(request.user, changes='User {} requested to view the mail queue'.format(request.user.email))
if not settings.API_ONLY:
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()
Expand Down

0 comments on commit 6b867fb

Please sign in to comment.