From e455dce9af3cc6c403b3014586117bbdb9b0c8a2 Mon Sep 17 00:00:00 2001 From: Guille Date: Tue, 19 May 2020 18:23:25 -0400 Subject: [PATCH] Bug fixing in usage factory --- usage/usage_feeders/us_base_usage_parameters.py | 4 ++-- usage/usage_feeders/us_new_york_city_usage_parameters.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/usage/usage_feeders/us_base_usage_parameters.py b/usage/usage_feeders/us_base_usage_parameters.py index e982087b..65009ab3 100644 --- a/usage/usage_feeders/us_base_usage_parameters.py +++ b/usage/usage_feeders/us_base_usage_parameters.py @@ -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') diff --git a/usage/usage_feeders/us_new_york_city_usage_parameters.py b/usage/usage_feeders/us_new_york_city_usage_parameters.py index 71ef4629..f7914252 100644 --- a/usage/usage_feeders/us_new_york_city_usage_parameters.py +++ b/usage/usage_feeders/us_new_york_city_usage_parameters.py @@ -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)