mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 18:09:57 -03:30
turn single element array into string
This commit is contained in:
parent
2317687468
commit
d0dc41daac
@ -1615,7 +1615,7 @@ class InventorySourceSerializer(UnifiedJobTemplateSerializer, InventorySourceOpt
|
||||
def build_relational_field(self, field_name, relation_info):
|
||||
field_class, field_kwargs = super(InventorySourceSerializer, self).build_relational_field(field_name, relation_info)
|
||||
# SCM Project and inventory are read-only unless creating a new inventory.
|
||||
if self.instance and field_name in ['inventory',]:
|
||||
if self.instance and field_name == 'inventory':
|
||||
field_kwargs['read_only'] = True
|
||||
field_kwargs.pop('queryset', None)
|
||||
return field_class, field_kwargs
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user