mirror of
https://github.com/ansible/awx.git
synced 2026-02-01 01:28:09 -03:30
Listing tags attached to an organization, and basic model/view things around tag details
This commit is contained in:
@@ -26,8 +26,12 @@ class BaseList(generics.ListCreateAPIView):
|
||||
raise exceptions.NotImplementedError
|
||||
|
||||
def get_queryset(self):
|
||||
if self.__class__.model == User:
|
||||
return self._get_queryset().filter(is_active=True)
|
||||
base = self._get_queryset()
|
||||
model = self.__class__.model
|
||||
if model == User:
|
||||
return base.filter(is_active=True)
|
||||
elif model in [ Tag, AuditTrail ]:
|
||||
return base
|
||||
else:
|
||||
return self._get_queryset().filter(active=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user