lims_interface: set attribute through Data.__init__(), not Model

This commit is contained in:
Mario Puntin 2020-03-26 19:49:10 -03:00
parent 95f584356a
commit a9449923d3
1 changed files with 7 additions and 1 deletions

View File

@ -132,8 +132,14 @@ class Data(sequence_ordered(), ModelSQL, ModelView):
return cls.get_sql_table()
def __init__(self, id=None, **kwargs):
kwargs = {}
kwargs_copy = kwargs.copy()
for kw in kwargs_copy:
kwargs.pop(kw, None)
super(Data, self).__init__(id, **kwargs)
self._values = {}
for kw in kwargs_copy:
self._values[kw] = kwargs_copy[kw]
def __getattr__(self, name):
try: