Skip to content

Commit

Permalink
fix a bug when user_agent is empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
mjnaderi committed May 15, 2018
1 parent d6024ad commit 854ba7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion qsessions/backends/cached_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class SessionStore(CachedDBStore):

def __init__(self, session_key=None, user_agent=None, ip=None):
self.modified = False
self.user_agent = user_agent[:300] if user_agent else None
self.user_agent = user_agent[:300] if user_agent else user_agent
self.ip = ip
self.user_id = None
super(SessionStore, self).__init__(session_key)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name='django-qsessions',
version='0.1.4',
version='0.1.5',
description='Extends Django\'s cached_db session backend',
long_description=README,
author='Mohammad Javad Naderi',
Expand Down

0 comments on commit 854ba7c

Please sign in to comment.