From afeccbbc26b067c9294677c62e0432b977ebcef8 Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Fri, 21 Oct 2022 16:36:10 +0200 Subject: [PATCH] feat(chalice): allow recreate cursor --- api/chalicelib/utils/pg_client.py | 1 + 1 file changed, 1 insertion(+) diff --git a/api/chalicelib/utils/pg_client.py b/api/chalicelib/utils/pg_client.py index 1aa846669..8da809418 100644 --- a/api/chalicelib/utils/pg_client.py +++ b/api/chalicelib/utils/pg_client.py @@ -117,6 +117,7 @@ class PostgresClient: def __enter__(self): if self.cursor is None: self.cursor = self.connection.cursor(cursor_factory=psycopg2.extras.RealDictCursor) + self.cursor.recreate = self.recreate_cursor return self.cursor def __exit__(self, *args):