feat(chalice): changed recreate cursor for pg_client

This commit is contained in:
Taha Yassine Kraiem 2022-10-21 17:42:45 +02:00
parent afeccbbc26
commit dafb88e542

View file

@ -147,7 +147,8 @@ class PostgresClient:
self.cursor.close()
except Exception as error:
logging.error("Error while closing cursor for recreation", error)
self.cursor = self.connection.cursor(cursor_factory=psycopg2.extras.RealDictCursor)
self.cursor = None
self.__enter__()
def close():