Skip to content

Commit 0329681

Browse files
committed
fixed logout action when there is no session
1 parent c23b0a3 commit 0329681

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGES.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ Fixed:
1717

1818
- encoding for SSHA encoded passwords with Python 3 (Christof
1919
Meerwald)
20+
- exception in logout action when there is no session (Christof
21+
Meerwald)
2022

2123
2020-04-05 2.0.0 beta 0
2224

roundup/cgi/client.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,9 @@ def clean_up(self):
198198
def destroy(self):
199199
self.client.add_cookie(self.cookie_name, None)
200200
self._data = {}
201-
self.session_db.destroy(self._sid)
202-
self.session_db.commit()
201+
if self._sid:
202+
self.session_db.destroy(self._sid)
203+
self.session_db.commit()
203204

204205
def get(self, name, default=None):
205206
return self._data.get(name, default)

0 commit comments

Comments
 (0)