Fix obscure crash in log entry view

This commit is contained in:
Raphael Michel
2020-09-07 11:27:23 +02:00
parent 23a9018988
commit 52944ff3a3
2 changed files with 4 additions and 2 deletions

View File

@@ -751,7 +751,9 @@ class DeviceLogView(OrganizerDetailViewMixin, OrganizerPermissionRequiredMixin,
qs = LogEntry.objects.filter(
device_id=self.device
).select_related(
'user', 'content_type', 'api_token', 'oauth_application', 'device', 'event'
'user', 'content_type', 'api_token', 'oauth_application',
).prefetch_related(
'device', 'event'
).order_by('-datetime')
return qs