Skip to content

Commit

Permalink
fix: missing reference
Browse files Browse the repository at this point in the history
  • Loading branch information
mehmetcanay committed Oct 23, 2024
1 parent 0ed9598 commit a439cd9
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions datastew/repository/weaviate.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,7 @@ def get_all_terminologies(self) -> List[Terminology]:
raise RuntimeError(f"Failed to fetch terminologies: {e}")
return terminologies

def get_mappings(
self, terminology_name: Optional[str] = None, limit=1000
) -> List[Mapping]:
def get_mappings(self, terminology_name: Optional[str] = None, limit=1000) -> List[Mapping]:
mappings = []
try:
mapping_collection = self.client.collections.get("Mapping")
Expand All @@ -206,9 +204,7 @@ def get_mappings(
f"Terminology {terminology_name} does not exists"
)
response = mapping_collection.query.fetch_objects(
filters=Filter.by_ref(link_on="hasTerminology")
.by_property("name")
.equal(terminology_name),
filters=Filter.by_ref(link_on="hasConcept").by_ref(link_on="hasTerminology").by_property("name").equal(terminology_name),
return_references=QueryReference(
link_on="hasConcept",
return_references=QueryReference(link_on="hasTerminology"),
Expand Down

0 comments on commit a439cd9

Please sign in to comment.