Renamed export factory
This commit is contained in:
parent
582c18ef0c
commit
c462d75e08
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user