From 55c41252f81d63d6351c9b3b621a87ff755f6765 Mon Sep 17 00:00:00 2001 From: Chris Church Date: Wed, 13 May 2015 13:44:53 -0400 Subject: [PATCH] Always return choices even if empty list. --- awx/api/serializers.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/awx/api/serializers.py b/awx/api/serializers.py index a56355fcd3..0bb29b5408 100644 --- a/awx/api/serializers.py +++ b/awx/api/serializers.py @@ -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