Skip to content

Commit

Permalink
Merge branch 'developer' of http://git.vst.lan/cloud/polemarch
Browse files Browse the repository at this point in the history
  • Loading branch information
onegreyonewhite committed Sep 26, 2017
2 parents 183fe10 + 5b63ea2 commit 1ded96e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion polemarch/api/v1/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ def supported_kinds(self, request):

class BulkViewSet(rest_views.APIView):
permission_classes = (StaffPermission,)
serializer_classes = serializers

_op_types = {
"add": "perform_create",
Expand All @@ -232,7 +233,7 @@ def get_serializer_class(self, item):
if item not in self._allowed_types:
raise excepts.UnsupportedMediaType(media_type=item)
item = "One{}Serializer".format(item.title())
return getattr(serializers, item)
return getattr(self.serializer_classes, item)

def get_serializer(self, *args, **kwargs):
kwargs["context"] = {'request': self.request}
Expand Down
2 changes: 1 addition & 1 deletion polemarch/main/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,5 +786,5 @@ def _get_info(self, key):
doc_data = load(data, Loader=Loader)
result["data"] = OrderedDict()
for field in self.fields:
result["data"][field] = doc_data[field]
result["data"][field] = doc_data.get(field, None)
return result

0 comments on commit 1ded96e

Please sign in to comment.