mirror of
https://github.com/ansible/awx.git
synced 2026-02-12 23:24:48 -03: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',
|
||||
'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):
|
||||
res = super(InstanceSerializer, self).get_related(obj)
|
||||
|
||||
Reference in New Issue
Block a user