From 16b4ecab06f7c3b7db6a7ab7d160974cfad3db64 Mon Sep 17 00:00:00 2001 From: Jacobe2169 Date: Mon, 11 Mar 2024 09:33:25 +0100 Subject: [PATCH] update regex --- backend/geonature/utils/config_schema.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/geonature/utils/config_schema.py b/backend/geonature/utils/config_schema.py index ba98ce9476..4dc36bf845 100644 --- a/backend/geonature/utils/config_schema.py +++ b/backend/geonature/utils/config_schema.py @@ -192,7 +192,7 @@ class GnPySchemaConf(Schema): SQLALCHEMY_DATABASE_URI = fields.String( required=True, validate=Regexp( - "^(postgres(?:ql)?):\/\/(?:([^@\s]+)@)?([^\/\s]+)(?:\/(\w+))?(?:\?(.+))?", + r"^(postgres(?:ql)?)((\+psycopg2)?):\/\/(?:([^@\s]+)@)?([^\/\s]+)(?:\/(\w+))?(?:\?(.+))?", error="PostgreSQL database URL is invalid. Check for authorized URL here : https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING-URIS", ), )