From 49f528e395f64dddea41428508e50df883fb5c6b Mon Sep 17 00:00:00 2001 From: Jean-Marie Favreau Date: Sun, 17 Dec 2023 18:05:20 +0100 Subject: [PATCH] =?UTF-8?q?Correction=20d'un=20bug=20dans=20l'acc=C3=A8s?= =?UTF-8?q?=20aux=20pages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/agenda_culturel/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/agenda_culturel/views.py b/src/agenda_culturel/views.py index bc83d9a..e99577e 100644 --- a/src/agenda_culturel/views.py +++ b/src/agenda_culturel/views.py @@ -210,7 +210,7 @@ class EventDetailView(UserPassesTestMixin, DetailView): template_name = "agenda_culturel/page-event.html" def test_func(self): - return self.request.user.is_authenticated or self.get_object().status != Event.STATUS.PUBLISHED + return self.request.user.is_authenticated or self.get_object().status == Event.STATUS.PUBLISHED @login_required(login_url="/accounts/login/") def change_status_event(request, pk, status):