bug fix: hanle case if session has not yet been created
This commit is contained in:
parent
1d33e55915
commit
1aa90f68a2
1 changed files with 2 additions and 1 deletions
|
@ -43,7 +43,8 @@ class SessionDataContainer(object):
|
||||||
def __getitem__(self, key):
|
def __getitem__(self, key):
|
||||||
client = component.getUtility(IMemcachedClient)
|
client = component.getUtility(IMemcachedClient)
|
||||||
value = client.query(key, ns=self.namespace)
|
value = client.query(key, ns=self.namespace)
|
||||||
value.parent = self
|
if value:
|
||||||
|
value.parent = self
|
||||||
return value
|
return value
|
||||||
|
|
||||||
def __setitem__(self, key, value):
|
def __setitem__(self, key, value):
|
||||||
|
|
Loading…
Add table
Reference in a new issue