Skip to content

Commit 9e0276b

Browse files
kiowajpic
authored andcommitted
Fix #62 Catch TypeError when converting string to time
This happens when upgrading from old versions and we have old sessions that has some old time formats.
1 parent f86f94d commit 9e0276b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

session_security/utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,6 @@ def get_last_activity(session):
3434
#################################################################
3535

3636
return datetime.now()
37+
except TypeError:
38+
return datetime.now()
39+

0 commit comments

Comments
 (0)