diff --git a/awx/api/views.py b/awx/api/views.py index 0930e5e71b..c10a5654d2 100644 --- a/awx/api/views.py +++ b/awx/api/views.py @@ -2670,6 +2670,12 @@ class InventoryUpdateList(ListAPIView): model = InventoryUpdate serializer_class = InventoryUpdateListSerializer + def get_queryset(self): + qs = super(InventoryUpdateList, self).get_queryset() + # TODO: remove this defer in 3.3 when we implement https://github.com/ansible/ansible-tower/issues/5436 + qs = qs.defer('result_stdout_text') + return qs + class InventoryUpdateDetail(UnifiedJobDeletionMixin, RetrieveDestroyAPIView): diff --git a/awx/main/access.py b/awx/main/access.py index 8297d2ba70..c2dae1397c 100644 --- a/awx/main/access.py +++ b/awx/main/access.py @@ -2084,6 +2084,7 @@ class UnifiedJobAccess(BaseAccess): # 'job_template__project', # 'job_template__credential', #) + # TODO: remove this defer in 3.3 when we implement https://github.com/ansible/ansible-tower/issues/5436 qs = qs.defer('result_stdout_text') return qs.all() diff --git a/awx/main/models/__init__.py b/awx/main/models/__init__.py index c044997fca..2443e16f45 100644 --- a/awx/main/models/__init__.py +++ b/awx/main/models/__init__.py @@ -147,6 +147,7 @@ activity_stream_registrar.connect(WorkflowJob) prevent_search(User._meta.get_field('password')) # Always, always, always defer result_stdout_text for polymorphic UnifiedJob rows +# TODO: remove this defer in 3.3 when we implement https://github.com/ansible/ansible-tower/issues/5436 def defer_stdout(f): def _wrapped(*args, **kwargs): objs = f(*args, **kwargs)