Skip to content

Commit

Permalink
Refactor.
Browse files Browse the repository at this point in the history
  • Loading branch information
riklaunim committed Apr 13, 2016
1 parent e2cdf30 commit 7b539e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion example/views.py
Expand Up @@ -22,7 +22,9 @@ class BlogCustomViewSet(viewsets.ModelViewSet):
def handle_exception(self, exc):
if isinstance(exc, exceptions.ValidationError):
exc.status_code = HTTP_422_UNPROCESSABLE_ENTITY
return format_drf_errors(super(BlogCustomViewSet, self).handle_exception(exc), self.get_exception_handler_context(), exc)
response = super(BlogCustomViewSet, self).handle_exception(exc)
context = self.get_exception_handler_context()
return format_drf_errors(response, context, exc)


class EntryViewSet(viewsets.ModelViewSet):
Expand Down

0 comments on commit 7b539e7

Please sign in to comment.