make permission denied exception class name explicit
diff --git a/planetstack/core/xoslib/methods/sliceplus.py b/planetstack/core/xoslib/methods/sliceplus.py
index 819ee92..2af4263 100644
--- a/planetstack/core/xoslib/methods/sliceplus.py
+++ b/planetstack/core/xoslib/methods/sliceplus.py
@@ -7,7 +7,7 @@
from django.forms import widgets
from core.xoslib.objects.sliceplus import SlicePlus
from plus import PlusSerializerMixin, PlusRetrieveUpdateDestroyAPIView, PlusListCreateAPIView
-from rest_framework.exceptions import PermissionDenied
+from rest_framework.exceptions import PermissionDenied as RestFrameworkPermissionDenied
if hasattr(serializers, "ReadOnlyField"):
# rest_framework 3.x
@@ -81,7 +81,7 @@
current_user_can_see = self.request.QUERY_PARAMS.get('current_user_can_see', False)
if (not self.request.user.is_authenticated()):
- raise PermissionDenied("You must be authenticated in order to use this API")
+ raise RestFrameworkPermissionDenied("You must be authenticated in order to use this API")
slices = SlicePlus.select_by_user(self.request.user)
@@ -107,7 +107,7 @@
def get_queryset(self):
if (not self.request.user.is_authenticated()):
- raise PermissionDenied("You must be authenticated in order to use this API")
+ raise RestFrameworkPermissionDenied("You must be authenticated in order to use this API")
return SlicePlus.select_by_user(self.request.user)
def update(self, request, *args, **kwargs):