mirror of
https://github.com/ansible/awx.git
synced 2026-03-11 14:39:30 -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):
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user