possibly fixed Issue 1630:memdb id error -- tries casting None to long., thanks Luca

This commit is contained in:
mdipierro
2013-08-15 09:21:58 -05:00
parent 61d81c01c4
commit 2cdcdaf932
3 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -741,7 +741,7 @@ class Session(Storage):
if record_id == '0':
raise Exception('record_id == 0')
# Select from database
row = db(table.id == record_id).select()
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
if not row or row.unique_key != unique_key: