diff --git a/proto/context.proto b/proto/context.proto index 1c7518b9f556e911d5b49744e170b4e28fe02f23..0d7a667311952a7443424c80e2b015b7c6713203 100644 --- a/proto/context.proto +++ b/proto/context.proto @@ -182,9 +182,9 @@ message Component { //Defined previously to this section Uuid component_uuid = 1; string name = 2; string type = 3; - repeated string child = 4; // list[sub-component.name] - map<string, string> attributes = 5; // dict[attr.name => json.dumps(attr.value)] - string parent = 6; + + map<string, string> attributes = 4; // dict[attr.name => json.dumps(attr.value)] + string parent = 5; } // ----------------------------------------------------- diff --git a/src/context/service/database/models/ComponentModel.py b/src/context/service/database/models/ComponentModel.py index c74b3955d6e3bd7296737d7e0d5f1985fe8a590f..964cb9bf3d2bbd28a79df76cb7c9e53b6a42e3ea 100644 --- a/src/context/service/database/models/ComponentModel.py +++ b/src/context/service/database/models/ComponentModel.py @@ -41,7 +41,7 @@ class ComponentModel(_Base): #Inherit def dump(self) -> Dict: data = json.loads(self.attributes) - data['component_uuid'] = self.component_uuid + data['component_uuid'] = {'uuid': self.component_uuid}, data['name'] = self.name data['type'] = self.type data['parent'] = self.parent