From efb70652afdf5d3024919eb5bf7f0ce4bab55143 Mon Sep 17 00:00:00 2001 From: Skia Date: Sat, 25 Sep 2021 20:46:15 +0200 Subject: [PATCH] counter: redirect to counter main when barman login is timed out --- counter/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/counter/views.py b/counter/views.py index 2ce9480a..b38a592b 100644 --- a/counter/views.py +++ b/counter/views.py @@ -370,7 +370,9 @@ class CounterClick(CounterTabsMixin, CanViewMixin, DetailView): ) or len(obj.get_barmen_list()) < 1 ): - raise PermissionDenied + return HttpResponseRedirect( + reverse_lazy("counter:details", kwargs={"counter_id": obj.id}) + ) else: if not request.user.is_authenticated: raise PermissionDenied