Ensure year of construction field is always an int
This commit is contained in:
parent
6c8fc2ba9e
commit
0a8c1c3c42
|
@ -77,7 +77,7 @@ class NrcanPhysicsParameters:
|
|||
nrcan_archetypes = nrcan_catalog.entries('archetypes')
|
||||
for building_archetype in nrcan_archetypes:
|
||||
construction_period_limits = building_archetype.construction_period.split('_')
|
||||
if int(construction_period_limits[0]) <= year_of_construction <= int(construction_period_limits[1]):
|
||||
if int(construction_period_limits[0]) <= int(year_of_construction) <= int(construction_period_limits[1]):
|
||||
if (str(function) == str(building_archetype.function)) and \
|
||||
(climate_zone == str(building_archetype.climate_zone)):
|
||||
return building_archetype
|
||||
|
|
|
@ -78,7 +78,7 @@ class NrelPhysicsParameters:
|
|||
construction_period_limits = building_archetype.construction_period.split(' - ')
|
||||
if construction_period_limits[1] == 'PRESENT':
|
||||
construction_period_limits[1] = 3000
|
||||
if int(construction_period_limits[0]) <= year_of_construction < int(construction_period_limits[1]):
|
||||
if int(construction_period_limits[0]) <= int(year_of_construction) < int(construction_period_limits[1]):
|
||||
if (str(function) == str(building_archetype.function)) and \
|
||||
(climate_zone == str(building_archetype.climate_zone)):
|
||||
return building_archetype
|
||||
|
|
Loading…
Reference in New Issue
Block a user