samuelduchesne / archetypal

archetypal: Retrieve, construct, simulate, convert and analyse building simulation templates
https://archetypal.readthedocs.io/
MIT License
12 stars 8 forks source link

Fixes an issue where ScheduleTypeLimits would not serialize to IDF strings when attributes are None #497

Closed samuelduchesne closed 9 months ago

samuelduchesne commented 9 months ago

Before this fix, the following would error out on the __repr__ method of EpBunch objects because UpperLimit is None.

from archetypal.schedule import Schedule, ScheduleTypeLimits
from archetypal import IDF

idf = IDF()
# Create the ScheduleTypeLimits object
typelimits = ScheduleTypeLimits(Name="Test", LowerLimit=0, UpperLimit=None)
typelimits.to_epbunch(idf)
samuelduchesne commented 9 months ago

superseded by #498