Raise the exception, not return it.
This commit is contained in:
parent
0af442e131
commit
007ae997cb
|
@ -610,7 +610,7 @@ class TicketDetailView(LoginRequiredMixin, UpdateView, DetailView):
|
||||||
def dispatch(self, request, *args, **kwargs):
|
def dispatch(self, request, *args, **kwargs):
|
||||||
ticket = self.get_object()
|
ticket = self.get_object()
|
||||||
if ticket.order.user != request.user:
|
if ticket.order.user != request.user:
|
||||||
return Http404
|
raise Http404
|
||||||
return super(TicketDetailView, self).dispatch(request, *args, **kwargs)
|
return super(TicketDetailView, self).dispatch(request, *args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue