Fixed some bugs

This commit is contained in:
2020-08-27 18:54:28 +02:00
parent 351c16f946
commit 37cd3ed757
27 changed files with 685 additions and 189 deletions
+10
View File
@@ -298,6 +298,12 @@ class PythonEvaluator(OneReturnValueEvaluator):
@staticmethod
def resolve_concept(context, concept_hint):
"""
Try to find a concept by its name, id or the pattern c:key|id:
:param context:
:param concept_hint:
:return:
"""
if isinstance(concept_hint, Concept):
return concept_hint
@@ -310,6 +316,10 @@ class PythonEvaluator(OneReturnValueEvaluator):
# So a concept was explicitly required, not its value
# We mark the concept as already evaluated, so it's body will not be evaluated
new_instance.metadata.is_evaluated = True
if len(concept.metadata.variables) > 0:
# In this situation, it means that we are dealing with the concept and not its instantiation
# So do not try to evaluate it
new_instance.metadata.is_evaluated = True
return new_instance