From f5a0275547ad264c8a9b9aa2a45cc461723a4f11 Mon Sep 17 00:00:00 2001 From: Tom Christie Date: Mon, 11 Feb 2013 13:02:20 +0000 Subject: Tidy up internal view permission checking logic. Also document correctly - these methods are now public and will fall under the deprecation policy from now on. --- rest_framework/mixins.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'rest_framework/mixins.py') diff --git a/rest_framework/mixins.py b/rest_framework/mixins.py index ce633112..d898ca12 100644 --- a/rest_framework/mixins.py +++ b/rest_framework/mixins.py @@ -93,8 +93,7 @@ class UpdateModelMixin(object): except Http404: # If this is a PUT-as-create operation, we need to ensure that # we have relevant permissions, as if this was a POST request. - if not self.has_permission(clone_request(request, 'POST')): - self.permission_denied(self.request) + self.check_permissions(clone_request(request, 'POST')) created = True success_status_code = status.HTTP_201_CREATED else: -- cgit v1.2.3