counter: redirect to counter main when barman login is timed out

This commit is contained in:
Skia 2021-09-25 20:46:15 +02:00
parent 05256bb99a
commit efb70652af

View File

@ -370,7 +370,9 @@ class CounterClick(CounterTabsMixin, CanViewMixin, DetailView):
) )
or len(obj.get_barmen_list()) < 1 or len(obj.get_barmen_list()) < 1
): ):
raise PermissionDenied return HttpResponseRedirect(
reverse_lazy("counter:details", kwargs={"counter_id": obj.id})
)
else: else:
if not request.user.is_authenticated: if not request.user.is_authenticated:
raise PermissionDenied raise PermissionDenied