From 02af67f674e4ae11db28970efe84258d75a2d0d9 Mon Sep 17 00:00:00 2001 From: jean-baptiste-perez-bib Date: Sat, 10 Aug 2024 13:52:09 +0200 Subject: [PATCH] Reverts "retrieve seeded facts directly from source" (test_link.py) This reverts commit 3ad88491bd9ec61e817e815f15c627002f2c0dc6. The reverted commit broke tests/objects/test_link.py tests. --- app/objects/c_operation.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/objects/c_operation.py b/app/objects/c_operation.py index 7f961d8f1..d7b553773 100644 --- a/app/objects/c_operation.py +++ b/app/objects/c_operation.py @@ -187,10 +187,9 @@ def update_untrusted_agents(self, agent): async def all_facts(self): knowledge_svc_handle = BaseService.get_service('knowledge_svc') - data_svc_handle = BaseService.get_service('data_svc') seeded_facts = [] if self.source: - seeded_facts = await data_svc_handle.get_facts_from_source(self.source.id) + seeded_facts = await knowledge_svc_handle.get_facts(criteria=dict(source=self.source.id)) learned_facts = await knowledge_svc_handle.get_facts(criteria=dict(source=self.id)) learned_facts = [f for f in learned_facts if f.score > 0] return seeded_facts + learned_facts