From c49ae3df046b504716e2b650c7e7f443eb9c9d47 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Mon, 19 Aug 2013 08:04:33 -0500 Subject: [PATCH] fixed again issue 1630:memdb id error -- tries casting None to long. --- VERSION | 2 +- gluon/globals.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index c21cf34d..bf89d0bf 100644 --- a/VERSION +++ b/VERSION @@ -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 diff --git a/gluon/globals.py b/gluon/globals.py index 1f856f90..d5d1999b 100644 --- a/gluon/globals.py +++ b/gluon/globals.py @@ -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