|
@@ -45,7 +45,7 @@ class EmComponent(object):
|
45
|
45
|
# @param id_or_name int|str: name or id of the object
|
46
|
46
|
# @throw TypeError if id_or_name is not an integer nor a string
|
47
|
47
|
# @throw NotImplementedError if called with EmComponent
|
48
|
|
- def __init__(self, data, components):
|
|
48
|
+ def __init__(self, data, model):
|
49
|
49
|
if type(self) == EmComponent:
|
50
|
50
|
raise NotImplementedError('Abstract class')
|
51
|
51
|
|
|
@@ -54,7 +54,7 @@ class EmComponent(object):
|
54
|
54
|
# @warning \ref _fields instance property is not the same than EmComponent::_fields class property. In the instance property the EditorialModel::fieldtypes::EmFieldType are instanciated to be able to handle datas
|
55
|
55
|
# @see EmComponent::_fields EditorialModel::fieldtypes::EmFieldType
|
56
|
56
|
self._fields = OrderedDict([(name, ftype()) for (name, ftype) in (EmComponent._fields + self.__class__._fields)])
|
57
|
|
- self.components = components
|
|
57
|
+ self.model = model
|
58
|
58
|
|
59
|
59
|
for name, value in data.items():
|
60
|
60
|
if name in self._fields:
|