AC-1040 Updated type choice names for unified job subclasses.

This commit is contained in:
Chris Church
2014-03-31 11:33:29 -04:00
parent 96a4752f2f
commit 2eeecb01a7
2 changed files with 14 additions and 5 deletions

View File

@@ -201,10 +201,7 @@ class GenericAPIView(generics.GenericAPIView, APIView):
# the metadata itself.
if 'type' in actions['GET']:
actions['GET']['type']['type'] = 'multiple choice'
actions['GET']['type']['choices'] = [
(x, unicode(get_model_for_type(x)._meta.verbose_name))
for x in serializer.get_types()
]
actions['GET']['type']['choices'] = serializer.get_type_choices()
ret['types'] = serializer.get_types()
if actions:
ret['actions'] = actions