Skip to content

Commit

Permalink
Call evaluate_pre() instead of evaluate() on Maybe decider
Browse files Browse the repository at this point in the history
e19142c introduced evaluate_pre to
perform context unrolling before to call the semi-public evaluate().

The Maybe decider was not updated at that time, but its context need to
be unrolled.
  • Loading branch information
francoisfreitag authored and rbarrois committed Apr 25, 2024
1 parent 01c0a73 commit d6349de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion factory/declarations.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ def evaluate_post(self, instance, step, overrides):
return target

def evaluate_pre(self, instance, step, overrides):
choice = self.decider.evaluate(instance=instance, step=step, extra={})
choice = self.decider.evaluate_pre(instance=instance, step=step, overrides={})
target = self.yes if choice else self.no
# The value can't be POST_INSTANTIATION, checked in __init__;
# evaluate it as `evaluate_pre`
Expand Down

0 comments on commit d6349de

Please sign in to comment.