Correct call to has_perm

This commit is contained in:
M.Ravi 2017-12-12 12:42:40 +01:00
parent 57311eda73
commit 091b277f7d

View file

@ -687,7 +687,9 @@ class OrdersHostingDetailView(LoginRequiredMixin,
order_id=order_id order_id=order_id
)) ))
hosting_order_obj = None hosting_order_obj = None
if not self.request.user.has_perm(hosting_order_obj): if not self.request.user.has_perm(
self.permission_required[0], hosting_order_obj
):
logger.debug( logger.debug(
"User {user} does not have permission on HostingOrder " "User {user} does not have permission on HostingOrder "
"{order_id}. Raising 404 error now.".format( "{order_id}. Raising 404 error now.".format(