From 28ef16e1e8cbdb80fa932aafcaff057140552c97 Mon Sep 17 00:00:00 2001 From: AlanCoding Date: Tue, 24 Jan 2017 10:14:44 -0500 Subject: [PATCH] activitiy stream optimization for org admins with large data sets --- awx/main/access.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/awx/main/access.py b/awx/main/access.py index aeeef9fa54..db27608af8 100644 --- a/awx/main/access.py +++ b/awx/main/access.py @@ -2102,11 +2102,10 @@ class ActivityStreamAccess(BaseAccess): - custom inventory scripts ''' qs = self.model.objects.all() - qs = qs.select_related('actor') qs = qs.prefetch_related('organization', 'user', 'inventory', 'host', 'group', 'inventory_source', 'inventory_update', 'credential', 'team', 'project', 'project_update', 'permission', 'job_template', 'job', 'ad_hoc_command', - 'notification_template', 'notification', 'label', 'role') + 'notification_template', 'notification', 'label', 'role', 'actor') if self.user.is_superuser or self.user.is_system_auditor: return qs.all()