Correction d'un bug dans l'accès aux pages
This commit is contained in:
parent
d79b6ed50a
commit
49f528e395
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user