Fix session_pk deletion
This commit is contained in:
parent
936a00bf68
commit
84e8f76c67
1 changed files with 2 additions and 2 deletions
|
@ -13,7 +13,7 @@ class RoomListView(generic.ListView):
|
||||||
template_name = 'gym/rooms.html'
|
template_name = 'gym/rooms.html'
|
||||||
|
|
||||||
def dispatch(self, request, *args, **kwargs):
|
def dispatch(self, request, *args, **kwargs):
|
||||||
if 'session' in request.session:
|
if 'session_pk' in request.session:
|
||||||
del request.session['session_pk']
|
del request.session['session_pk']
|
||||||
|
|
||||||
return super().dispatch(request, *args, **kwargs)
|
return super().dispatch(request, *args, **kwargs)
|
||||||
|
@ -25,7 +25,7 @@ class RoomDetailView(generic.DetailView):
|
||||||
template_name = 'gym/room.html'
|
template_name = 'gym/room.html'
|
||||||
|
|
||||||
def dispatch(self, request, *args, **kwargs):
|
def dispatch(self, request, *args, **kwargs):
|
||||||
if 'session' in request.session:
|
if 'session_pk' in request.session:
|
||||||
del request.session['session_pk']
|
del request.session['session_pk']
|
||||||
|
|
||||||
return super().dispatch(request, *args, **kwargs)
|
return super().dispatch(request, *args, **kwargs)
|
||||||
|
|
Loading…
Reference in a new issue