mirror of
https://github.com/ansible/awx.git
synced 2026-02-02 01:58:09 -03:30
Change filtering priority to prevent building a queryset with null
values when examining project activity stream
This commit is contained in:
@@ -621,6 +621,10 @@ class ProjectActivityStreamList(SubListAPIView):
|
||||
parent = self.get_parent_object()
|
||||
self.check_parent_access(parent)
|
||||
qs = self.request.user.get_queryset(self.model)
|
||||
if parent is None:
|
||||
return qs
|
||||
elif parent.credential is None:
|
||||
return qs.filter(project=parent)
|
||||
return qs.filter(Q(project=parent) | Q(credential__in=parent.credential))
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user