From 9df78fb0658f56a924265edbb46f0491691b902c Mon Sep 17 00:00:00 2001
From: Armingol <pablo.armingolrobles@telefonica.com>
Date: Thu, 21 Sep 2023 14:47:18 +0200
Subject: [PATCH] Changes in context

---
 proto/context.proto                                   | 6 +++---
 src/context/service/database/models/ComponentModel.py | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/proto/context.proto b/proto/context.proto
index 1c7518b9f..0d7a66731 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 c74b3955d..964cb9bf3 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
-- 
GitLab