diff --git a/hub_api/config.py b/hub_api/config.py index 6e970a2..aa68fd3 100644 --- a/hub_api/config.py +++ b/hub_api/config.py @@ -12,13 +12,13 @@ import pickle class Config: def __init__(self): - self.factory = CityExportFactory(db_name='hub_prod', app_env='PROD', - dotenv_path="{}/.env".format(os.path.expanduser('~'))) + self.export_db_factory = CityExportFactory(db_name='hub_prod', app_env='PROD', + dotenv_path="{}/.env".format(os.path.expanduser('~'))) self.import_db_factory = DBFactory(db_name='hub_prod', app_env='PROD', dotenv_path="{}/.env".format(os.path.expanduser('~'))) def get_city(self, city_id): - city_obj = self.factory.get_city(city_id) + city_obj = self.export_db_factory.get_city(city_id) city = pickle.loads(city_obj.city) for building in city.buildings: building.heated = True