WFJT activity stream optimization

This commit is contained in:
AlanCoding
2017-01-26 11:23:47 -05:00
parent 77f0625d44
commit 3b4af0aa82
3 changed files with 21 additions and 5 deletions

View File

@@ -2104,10 +2104,10 @@ class ActivityStreamAccess(BaseAccess):
qs = self.model.objects.all()
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',
'job_template', 'job', 'ad_hoc_command',
'notification_template', 'notification', 'label', 'role', 'actor',
'schedule', 'role', 'custom_inventory_script', 'unified_job_template',
'workflow_job_template')
'schedule', 'custom_inventory_script', 'unified_job_template',
'workflow_job_template', 'workflow_job')
if self.user.is_superuser or self.user.is_system_auditor:
return qs.all()