merged pull 27, thanks Niphlod
This commit is contained in:
@@ -185,7 +185,8 @@ class MockQuery(object):
|
|||||||
if self.with_lock:
|
if self.with_lock:
|
||||||
acquire_lock(self.db, key + ':lock', self.value)
|
acquire_lock(self.db, key + ':lock', self.value)
|
||||||
rtn = self.db.hgetall(key)
|
rtn = self.db.hgetall(key)
|
||||||
rtn['update_record'] = self.update # update record support
|
if rtn:
|
||||||
|
rtn['update_record'] = self.update # update record support
|
||||||
return [Storage(rtn)] if rtn else []
|
return [Storage(rtn)] if rtn else []
|
||||||
elif self.op == 'ge' and self.field == 'id' and self.value == 0:
|
elif self.op == 'ge' and self.field == 'id' and self.value == 0:
|
||||||
#means that someone wants the complete list
|
#means that someone wants the complete list
|
||||||
|
|||||||
+1
-1
@@ -915,7 +915,7 @@ class Session(Storage):
|
|||||||
return
|
return
|
||||||
(record_id, sep, unique_key) = response.session_id.partition(':')
|
(record_id, sep, unique_key) = response.session_id.partition(':')
|
||||||
|
|
||||||
if record_id.isdigit() and long(record_id):
|
if record_id.isdigit() and long(record_id)>0:
|
||||||
new_unique_key = web2py_uuid()
|
new_unique_key = web2py_uuid()
|
||||||
row = table(record_id)
|
row = table(record_id)
|
||||||
if row and row.unique_key==unique_key:
|
if row and row.unique_key==unique_key:
|
||||||
|
|||||||
Reference in New Issue
Block a user