mirror of
https://github.com/ansible/awx.git
synced 2026-02-24 14:36:00 -03:30
turn single element array into string
This commit is contained in:
@@ -1615,7 +1615,7 @@ class InventorySourceSerializer(UnifiedJobTemplateSerializer, InventorySourceOpt
|
|||||||
def build_relational_field(self, field_name, relation_info):
|
def build_relational_field(self, field_name, relation_info):
|
||||||
field_class, field_kwargs = super(InventorySourceSerializer, self).build_relational_field(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.
|
# 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['read_only'] = True
|
||||||
field_kwargs.pop('queryset', None)
|
field_kwargs.pop('queryset', None)
|
||||||
return field_class, field_kwargs
|
return field_class, field_kwargs
|
||||||
|
|||||||
Reference in New Issue
Block a user