Add retrieve result test and correct lock in sqlalchemy
This commit is contained in:
parent
9365b47dc2
commit
1691ada01c
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user