Bug fixing in usage factory

This commit is contained in:
Guille Gutierrez 2020-05-19 18:23:25 -04:00
parent 6a7603f039
commit e455dce9af
2 changed files with 4 additions and 3 deletions

View File

@ -27,9 +27,9 @@ class UsBaseUsageParameters:
break
continue
else:
city_object.usage_zone = [UsBaseUsageParameters._parse_zone_usage_type(zone_usage_type, usage_zone)]
city_object.usage_zones = [UsBaseUsageParameters._parse_zone_usage_type(zone_usage_type, usage_zone)]
break
if city_object.usage_zone is None:
if city_object.usage_zones is None:
print(city_object.function)
raise Exception('Usage not found for building function')

View File

@ -4,4 +4,5 @@ from usage.usage_feeders.helpers.us_pluto_to_usage import UsPlutoToUsage as Pu
class UsNewYorkCityUsageParameters(UsBaseUsageParameters):
def __init__(self, city):
super().__init__(city, Pu.usage)
self._city = city
super().__init__(self._city, Pu.usage)