aboutsummaryrefslogtreecommitdiffstats
path: root/rest_framework/mixins.py
diff options
context:
space:
mode:
authorTom Christie2013-02-11 13:02:20 +0000
committerTom Christie2013-02-12 08:58:28 +0000
commitf5a0275547ad264c8a9b9aa2a45cc461723a4f11 (patch)
treea73b8835792eca9053ad5c4bc2c91ae7b1ae040b /rest_framework/mixins.py
parent09b01887f234be55c14943028330f569823b2369 (diff)
downloaddjango-rest-framework-f5a0275547ad264c8a9b9aa2a45cc461723a4f11.tar.bz2
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.
Diffstat (limited to 'rest_framework/mixins.py')
-rw-r--r--rest_framework/mixins.py3
1 files changed, 1 insertions, 2 deletions
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: