Skip to content

Commit

Permalink
fix(linker): dont call get_possible_subrefs if node isn't NumberedRef…
Browse files Browse the repository at this point in the history
…erenceableBookNode
  • Loading branch information
nsantacruz committed Oct 9, 2024
1 parent e9d4750 commit 4ce78b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sefaria/model/linker/resolved_ref_refiner.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def __refine_context_full(self) -> List['ResolvedRef']:
return [self._clone_resolved_ref(resolved_parts=self._get_resolved_parts(), node=self.node, ref=refined_ref)]

def __refine_context_free(self, lang: str, fromSections=None) -> List['ResolvedRef']:
if self.node is None:
if self.node is None or not isinstance(self.node, NumberedReferenceableBookNode):
return []
possible_subrefs, can_match_out_of_order_list = self.node.possible_subrefs(lang, self.resolved_ref.ref, self.part_to_match.text, fromSections)
refined_refs = []
Expand Down

0 comments on commit 4ce78b9

Please sign in to comment.