From 1691ada01cb58f7666e1f4a3d300e2aeb15751bc Mon Sep 17 00:00:00 2001 From: Guille Date: Thu, 3 Aug 2023 12:21:40 -0400 Subject: [PATCH] Add retrieve result test and correct lock in sqlalchemy --- hub/persistence/repositories/city.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/hub/persistence/repositories/city.py b/hub/persistence/repositories/city.py index bef0aa55..9c20346f 100644 --- a/hub/persistence/repositories/city.py +++ b/hub/persistence/repositories/city.py @@ -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)