Open EdCaunt opened 4 months ago
If a ConditionalDimension is created with factor=None, then self._factor is set to None, but self.factor will return 1. As such, when rebuilding a ConditionalDimension with no factor, a factor of 1 is added unexpectedly, changing the generated code.
ConditionalDimension
factor=None
self._factor
None
self.factor
Is there an MFE for this?
Create a ConditionalDimension with a condition but no factor, then compare cd._factor to cd._rebuild()._factor
cd._factor
cd._rebuild()._factor
If a
ConditionalDimension
is created withfactor=None
, thenself._factor
is set toNone
, butself.factor
will return 1. As such, when rebuilding aConditionalDimension
with no factor, a factor of 1 is added unexpectedly, changing the generated code.