mirror of
https://github.com/ansible/awx.git
synced 2026-03-08 21:19:26 -02:30
Merge pull request #12968 from ansible/instance-serializer-defaults
Make sure to include field defaults for Instance node_type and node_state
This commit is contained in:
@@ -4913,7 +4913,10 @@ class InstanceSerializer(BaseSerializer):
|
|||||||
'ip_address',
|
'ip_address',
|
||||||
'listener_port',
|
'listener_port',
|
||||||
)
|
)
|
||||||
extra_kwargs = {'node_type': {'initial': 'execution'}, 'node_state': {'initial': 'installed'}}
|
extra_kwargs = {
|
||||||
|
'node_type': {'initial': Instance.Types.EXECUTION, 'default': Instance.Types.EXECUTION},
|
||||||
|
'node_state': {'initial': Instance.States.INSTALLED, 'default': Instance.States.INSTALLED},
|
||||||
|
}
|
||||||
|
|
||||||
def get_related(self, obj):
|
def get_related(self, obj):
|
||||||
res = super(InstanceSerializer, self).get_related(obj)
|
res = super(InstanceSerializer, self).get_related(obj)
|
||||||
|
|||||||
Reference in New Issue
Block a user