Update idf
This commit is contained in:
parent
84d80d5d2a
commit
a0f7ca0e17
|
@ -136,3 +136,7 @@ class City(Repository):
|
|||
except SQLAlchemyError as err:
|
||||
logging.error('Error while fetching city by name %s', err)
|
||||
raise SQLAlchemyError from err
|
||||
|
||||
def get_by_id(self, city_id) -> Model:
|
||||
with Session(self.engine) as session:
|
||||
return session.execute(select(Model).where(Model.id == city_id)).first()[0]
|
Loading…
Reference in New Issue
Block a user