From 42c020e5628470c028bc5bbd14c04ecb3f44bc1a Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Thu, 10 Nov 2022 16:40:39 +0100 Subject: [PATCH] feat(chalice): return cursor after re-creation --- api/chalicelib/utils/pg_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/chalicelib/utils/pg_client.py b/api/chalicelib/utils/pg_client.py index 1bfb7aa09..1c4ef8560 100644 --- a/api/chalicelib/utils/pg_client.py +++ b/api/chalicelib/utils/pg_client.py @@ -142,7 +142,7 @@ class PostgresClient: except Exception as error: logging.error("Error while closing cursor for recreation", error) self.cursor = None - self.__enter__() + return self.__enter__() async def init():