diff --git a/hub/persistence/db_control.py b/hub/persistence/db_control.py index c6740336..259b9dcf 100644 --- a/hub/persistence/db_control.py +++ b/hub/persistence/db_control.py @@ -75,6 +75,7 @@ class DBControl: : """ cities = self._city.get_by_user_id_application_id_and_scenario(user_id, application_id, scenario) + c = [c[0].id for c in cities] for city in cities: result = self.building_info(name, city[0].id) if result is not None: @@ -90,6 +91,15 @@ class DBControl: """ return self._city_object.get_by_name_or_alias_and_city(name, city_id) + def building_info_in_cities(self, name, cities) -> CityObject: + """ + Retrieve the building info from the database + :param name: Building name + :param cities: [City ID] + :return: CityObject + """ + return self._city_object.get_by_name_or_alias_in_cities(name, cities) + def buildings_info(self, request_values, city_id) -> [CityObject]: """ Retrieve the buildings info from the database