mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 23:51:09 +03:00
Remove extra project-related DB hit, follow same pattern as unified jobs
This commit is contained in:
parent
f66fa6fb7c
commit
cf81199bbf
@ -285,7 +285,8 @@ class BaseSerializer(serializers.ModelSerializer):
|
||||
# because it results in additional queries.
|
||||
if fk == 'job' and isinstance(obj, UnifiedJob):
|
||||
continue
|
||||
if fk == 'project' and isinstance(obj, InventorySource):
|
||||
if fk == 'project' and (isinstance(obj, InventorySource) or
|
||||
isinstance(obj, Project)):
|
||||
continue
|
||||
|
||||
fkval = getattr(obj, fk, None)
|
||||
|
Loading…
Reference in New Issue
Block a user