Skip to content

Commit

Permalink
fix(tokens), #145: Correct handling of #REF! when compiling functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
vinci1it2000 committed Jul 15, 2024
1 parent f06dd83 commit 52ca981
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion formulas/tokens/operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ def __repr__(self):
def update_input_tokens(self, *tokens):
if self.name in ' ,:':
self.attr['is_ranges'] = True
from .operand import Range
from .operand import Range, Error
for t in tokens:
if isinstance(t, Range):
t.attr['is_ranges'] = True
elif isinstance(t, Error) and t.name == '#REF!':
t.attr['is_ranges'] = True
elif not t.attr.get('is_ranges', False):
raise FormulaError()
else:
Expand Down

0 comments on commit 52ca981

Please sign in to comment.