Skip to content

Commit

Permalink
Bitrix pre_filter for formula with original_field_id (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
ForrestGump authored Dec 14, 2023
1 parent 6b89d54 commit e010a16
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,8 @@ class BitrixGDSMultiQuerySplitter(PrefilteredFieldMultiQuerySplitter):
result_schema: ResultSchema = attr.ib(kw_only=True)

def is_pre_filter(self, formula: CompiledFormulaInfo) -> bool:
assert formula.original_field_id is not None
expr = formula.formula_obj.expr
if not isinstance(expr, formula_nodes.OperationCall):
if not isinstance(expr, formula_nodes.OperationCall) or formula.original_field_id is None:
return False
field = self.result_schema.by_guid(formula.original_field_id)
if field.data_type in self.data_types and expr.name in self.expr_names:
Expand Down

0 comments on commit e010a16

Please sign in to comment.