mirror of
https://github.com/ZwareBear/awx.git
synced 2026-04-02 06:01:48 -05:00
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