mirror of
https://github.com/pretix/pretix.git
synced 2026-05-03 14:54:04 +00:00
Fixed redirections and errors
This commit is contained in:
@@ -70,5 +70,5 @@ class PermissionMiddleware:
|
||||
permitted__id__exact=request.user.id,
|
||||
)[0]
|
||||
except IndexError:
|
||||
return Http404(_("The selected organizer was not found or you "
|
||||
"have no permission to administrate it."))
|
||||
raise Http404(_("The selected organizer was not found or you "
|
||||
"have no permission to administrate it."))
|
||||
|
||||
@@ -231,7 +231,7 @@ class OrderDownload(OrderView):
|
||||
ct.cachedfile = cf
|
||||
ct.save()
|
||||
generate(self.order.identity, self.output.identifier)
|
||||
return redirect(reverse('presale:cachedfile.download', kwargs={'id': ct.cachedfile.id}))
|
||||
return redirect(reverse('cachedfile.download', kwargs={'id': ct.cachedfile.id}))
|
||||
|
||||
|
||||
class OrderExtend(OrderView):
|
||||
|
||||
@@ -31,4 +31,4 @@ class EventMiddleware:
|
||||
organizer__slug=url.kwargs['organizer'],
|
||||
).select_related('organizer')[0]
|
||||
except IndexError:
|
||||
return Http404(_('The selected event was not found.'))
|
||||
raise Http404(_('The selected event was not found.'))
|
||||
|
||||
@@ -290,4 +290,4 @@ class OrderDownload(EventViewMixin, OrderDetailMixin, View):
|
||||
ct.cachedfile = cf
|
||||
ct.save()
|
||||
generate(self.order.identity, self.output.identifier)
|
||||
return redirect(reverse('presale:cachedfile.download', kwargs={'id': ct.cachedfile.id}))
|
||||
return redirect(reverse('cachedfile.download', kwargs={'id': ct.cachedfile.id}))
|
||||
|
||||
Reference in New Issue
Block a user