Add retrieve result test and correct lock in sqlalchemy

This commit is contained in:
Guille Gutierrez 2023-08-03 12:21:40 -04:00
parent 9365b47dc2
commit 1691ada01c

View File

@ -130,8 +130,6 @@ class City(Repository):
result_set = self.session.execute(
select(Model).where(Model.user_id == user_id, Model.application_id == application_id)
)
self.session.close()
self.session = Session(self.engine)
return [r[0] for r in result_set]
except SQLAlchemyError as err:
logging.error('Error while fetching city by name %s', err)