mirror of
https://github.com/ansible/awx.git
synced 2026-01-19 13:41:28 -03:30
Merge pull request #6173 from wwitzel3/devel
Add organization to the InventorySource fields
This commit is contained in:
commit
17b18f3d85
@ -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