Fix in redis_session.py select: prevent errors when value is integer/long
This commit is contained in:
@@ -168,7 +168,7 @@ class MockQuery(object):
|
|||||||
def select(self):
|
def select(self):
|
||||||
if self.op == 'eq' and self.field == 'id' and self.value:
|
if self.op == 'eq' and self.field == 'id' and self.value:
|
||||||
#means that someone wants to retrieve the key self.value
|
#means that someone wants to retrieve the key self.value
|
||||||
key = self.keyprefix + ':' + self.value
|
key = self.keyprefix + ':' + str(self.value)
|
||||||
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user