mirror of
https://github.com/ansible/awx.git
synced 2026-01-25 00:11:23 -03:30
Always return choices even if empty list.
This commit is contained in:
parent
af67ac6931
commit
55c41252f8
@ -120,8 +120,7 @@ class ChoiceField(fields.ChoiceField):
|
||||
|
||||
def metadata(self):
|
||||
metadata = super(ChoiceField, self).metadata()
|
||||
if self.choices:
|
||||
metadata['choices'] = self.choices
|
||||
metadata['choices'] = self.choices or []
|
||||
return metadata
|
||||
|
||||
# Monkeypatch REST framework to replace default ChoiceField used by
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user