mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-31 17:17:53 +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):
|
||||
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:
|
||||
return None
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user