mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 12:20:45 -03:30
Add organization to the InventorySource fields
This commit is contained in:
parent
17a65bd67b
commit
0134b7e0bd
@ -1591,6 +1591,8 @@ class InventorySourceSerializer(UnifiedJobTemplateSerializer, InventorySourceOpt
|
||||
ret = super(InventorySourceSerializer, self).to_representation(obj)
|
||||
if obj is None:
|
||||
return ret
|
||||
if obj.inventory and obj.inventory.organization:
|
||||
ret['organization'] = obj.inventory.organization.pk
|
||||
if 'inventory' in ret and not obj.inventory:
|
||||
ret['inventory'] = None
|
||||
return ret
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user