From 77fe27f0f8e4e33fd2fb13e8046deb30e4a2efd8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Aur=C3=A9lien=20Lamercerie?=
 <aurelien.lamercerie@tetras-libre.fr>
Date: Wed, 15 Feb 2023 00:33:40 +0100
Subject: [PATCH] Add control in net getter

---
 tenet/febTransduction/net/net.py                  | 5 +++--
 tenet/febTransduction/phenomena_application_or.py | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/tenet/febTransduction/net/net.py b/tenet/febTransduction/net/net.py
index 207f3a77..3753c204 100644
--- a/tenet/febTransduction/net/net.py
+++ b/tenet/febTransduction/net/net.py
@@ -80,10 +80,11 @@ class Net:
     def get_attribute_value(self, **attr):
         
         res = None
+        
         for attr_key, attr_value in attr.items():
-            if attr_value == None:
+            if (self.uri is not None) & (attr_value is None):
                 res = self.__select_value_in_graph(attr_key)
-            elif attr_value == []:
+            elif (self.uri is not None) & (attr_value == []):
                 res = self.__select_value_list_in_graph(attr_key)
             else:
                 res = attr_value
diff --git a/tenet/febTransduction/phenomena_application_or.py b/tenet/febTransduction/phenomena_application_or.py
index f8aed303..fe469053 100644
--- a/tenet/febTransduction/phenomena_application_or.py
+++ b/tenet/febTransduction/phenomena_application_or.py
@@ -100,7 +100,7 @@ def analyze_phenomena_or_1(graph):
         composite_class_net.compose(class_net, property_net, phenomena_net)
     
         # -- Data Computation
-        composite_class_net.mother_class = class_net
+        composite_class_net.mother_class = class_net.uri
         # etc
     
         # -- Restriction Computation
-- 
GitLab