|
@@ -268,8 +268,8 @@ raised when trying to import Datasource"
|
268
|
268
|
|
269
|
269
|
##@brief Read only access to all datas
|
270
|
270
|
#@return a dict representing datas of current instance
|
271
|
|
- def datas(self):
|
272
|
|
- return [self.data(fname) for fname in self.fieldnames(True)]
|
|
271
|
+ def datas(self, internal = False):
|
|
272
|
+ return {fname:self.data(fname) for fname in self.fieldnames(internal)}
|
273
|
273
|
|
274
|
274
|
|
275
|
275
|
##@brief Datas setter
|
|
@@ -485,7 +485,7 @@ raised when trying to import Datasource"
|
485
|
485
|
## @brief Update an instance of LeObject
|
486
|
486
|
#
|
487
|
487
|
#@param datas : list of new datas
|
488
|
|
- def update(self, datas):
|
|
488
|
+ def update(self, datas = None):
|
489
|
489
|
datas = self.datas(internal=False) if datas is None else datas
|
490
|
490
|
uids = self._uid
|
491
|
491
|
query_filter = list()
|
|
@@ -493,7 +493,7 @@ raised when trying to import Datasource"
|
493
|
493
|
query_filter.append((uid, '=', self.data(uid)))
|
494
|
494
|
|
495
|
495
|
try:
|
496
|
|
- query = LeUpdateQuery(cls, query_filter)
|
|
496
|
+ query = LeUpdateQuery(self.__class__, query_filter)
|
497
|
497
|
except Exception as err:
|
498
|
498
|
raise err
|
499
|
499
|
|