Fixed some bugs
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user