diff --git a/gym/views.py b/gym/views.py index 3a7d487..249eada 100644 --- a/gym/views.py +++ b/gym/views.py @@ -13,7 +13,7 @@ class RoomListView(generic.ListView): template_name = 'gym/rooms.html' def dispatch(self, request, *args, **kwargs): - if 'session' in request.session: + if 'session_pk' in request.session: del request.session['session_pk'] return super().dispatch(request, *args, **kwargs) @@ -25,7 +25,7 @@ class RoomDetailView(generic.DetailView): template_name = 'gym/room.html' def dispatch(self, request, *args, **kwargs): - if 'session' in request.session: + if 'session_pk' in request.session: del request.session['session_pk'] return super().dispatch(request, *args, **kwargs)