mirror of
https://github.com/ansible/awx.git
synced 2026-05-19 14:57:39 -02:30
Always return choices even if empty list.
This commit is contained in:
@@ -120,8 +120,7 @@ class ChoiceField(fields.ChoiceField):
|
|||||||
|
|
||||||
def metadata(self):
|
def metadata(self):
|
||||||
metadata = super(ChoiceField, self).metadata()
|
metadata = super(ChoiceField, self).metadata()
|
||||||
if self.choices:
|
metadata['choices'] = self.choices or []
|
||||||
metadata['choices'] = self.choices
|
|
||||||
return metadata
|
return metadata
|
||||||
|
|
||||||
# Monkeypatch REST framework to replace default ChoiceField used by
|
# Monkeypatch REST framework to replace default ChoiceField used by
|
||||||
|
|||||||
Reference in New Issue
Block a user