mirror of
https://github.com/dkmstr/openuds.git
synced 2025-01-18 06:03:54 +03:00
Fixed for getByAttr1 to return FIRST element in case of error
This commit is contained in:
parent
3b04e2a180
commit
0070b1618b
@ -103,7 +103,7 @@ class Storage(object):
|
|||||||
|
|
||||||
def getPickleByAttr1(self, attr1):
|
def getPickleByAttr1(self, attr1):
|
||||||
try:
|
try:
|
||||||
return pickle.loads(encoders.decode(dbStorage.objects.get(owner=self._owner, attr1=attr1).data, 'base64')) # @UndefinedVariable
|
return pickle.loads(encoders.decode(dbStorage.objects.filter(owner=self._owner, attr1=attr1)[0].data, 'base64')) # @UndefinedVariable
|
||||||
except Exception:
|
except Exception:
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user