Fixed some bugs
This commit is contained in:
@@ -35,7 +35,8 @@ class AddConceptInSetEvaluator(OneReturnValueEvaluator):
|
||||
True,
|
||||
sheerka.new(BuiltinConcepts.USER_INPUT, body=parser_input, user_name="N/A"))
|
||||
|
||||
with context.push(BuiltinConcepts.PROCESS_INPUT, name_node, desc=f"Recognizing '{name_node}'") as sub_context:
|
||||
with context.push(BuiltinConcepts.PROCESS_INPUT, name_node,
|
||||
desc=f"Recognizing '{name_node}'") as sub_context:
|
||||
r = sheerka.execute(sub_context, ret_val, ALL_STEPS)
|
||||
one_r = core.builtin_helpers.expect_one(context, r)
|
||||
sub_context.add_values(return_values=one_r)
|
||||
@@ -55,6 +56,10 @@ class AddConceptInSetEvaluator(OneReturnValueEvaluator):
|
||||
parents=[return_value])
|
||||
concept = res.value
|
||||
|
||||
if sheerka.has_id(concept.id) and id(concept) == id(sheerka.get_by_id(concept.id)):
|
||||
# hack because it is not possible to use sheerka.modify_concept() on a cache instance
|
||||
concept = sheerka.new((concept.name, concept.id))
|
||||
|
||||
res = _resolve(isa_node.set)
|
||||
if not res.status:
|
||||
return sheerka.ret(
|
||||
@@ -75,5 +80,3 @@ class AddConceptInSetEvaluator(OneReturnValueEvaluator):
|
||||
res.status,
|
||||
res.body,
|
||||
parents=[return_value])
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user