fixed again issue 1630:memdb id error -- tries casting None to long.

This commit is contained in:
mdipierro
2013-08-19 08:04:33 -05:00
parent 8121e2b99c
commit c49ae3df04
2 changed files with 3 additions and 2 deletions

View File

@@ -1 +1 @@
Version 2.6.0-development+timestamp.2013.08.18.02.49.16
Version 2.6.0-development+timestamp.2013.08.19.08.03.43

View File

@@ -738,9 +738,10 @@ class Session(Storage):
# Get session data out of the database
(record_id, unique_key) = response.session_id.split(':')
if record_id == '0':
if not record_id.isdigit() or long(record_id)<1:
raise Exception('record_id == 0')
# Select from database
record_id = long(record_id)
row = record_id and db(table.id == record_id).select()
row = row and row[0] or None
# Make sure the session data exists in the database