mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 23:51:09 +03:00
create actual QuerySets
This commit is contained in:
parent
344588b102
commit
d68fc7a185
@ -1004,7 +1004,7 @@ class JobEventAccess(BaseAccess):
|
||||
model = JobEvent
|
||||
|
||||
def get_queryset(self):
|
||||
qs = self.model.objects
|
||||
qs = self.model.objects.all()
|
||||
qs = qs.select_related('job', 'job__job_template', 'host', 'parent')
|
||||
qs = qs.prefetch_related('hosts', 'children')
|
||||
|
||||
@ -1040,7 +1040,7 @@ class UnifiedJobTemplateAccess(BaseAccess):
|
||||
model = UnifiedJobTemplate
|
||||
|
||||
def get_queryset(self):
|
||||
qs = self.model.objects
|
||||
qs = self.model.objects.all()
|
||||
project_qs = self.user.get_queryset(Project).filter(scm_type__in=[s[0] for s in Project.SCM_TYPE_CHOICES])
|
||||
inventory_source_qs = self.user.get_queryset(InventorySource).filter(source__in=CLOUD_INVENTORY_SOURCES)
|
||||
job_template_qs = self.user.get_queryset(JobTemplate)
|
||||
@ -1072,7 +1072,7 @@ class UnifiedJobAccess(BaseAccess):
|
||||
model = UnifiedJob
|
||||
|
||||
def get_queryset(self):
|
||||
qs = self.model.objects
|
||||
qs = self.model.objects.all()
|
||||
project_update_qs = self.user.get_queryset(ProjectUpdate)
|
||||
inventory_update_qs = self.user.get_queryset(InventoryUpdate).filter(source__in=CLOUD_INVENTORY_SOURCES)
|
||||
job_qs = self.user.get_queryset(Job)
|
||||
@ -1201,7 +1201,7 @@ class ActivityStreamAccess(BaseAccess):
|
||||
model = ActivityStream
|
||||
|
||||
def get_queryset(self):
|
||||
qs = self.model.objects
|
||||
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',
|
||||
|
Loading…
Reference in New Issue
Block a user