Fix PostgreSQL URI

SQLAlchemy removed support for `postgres://`, the URI has to start with `postgresql://`.
This commit is contained in:
Xavier Gendre
2021-10-07 22:47:15 +02:00
committed by GitHub
parent f7985a9d03
commit d447bfa81b

View File

@@ -34,7 +34,7 @@ class Automx(base.Installer):
"""Additional variables.""" """Additional variables."""
context = super(Automx, self).get_template_context() context = super(Automx, self).get_template_context()
sql_dsn = "{}://{}:{}@{}/{}".format( sql_dsn = "{}://{}:{}@{}/{}".format(
self.dbengine, "postgresql" if self.dbengine == "postgres" else self.dbengine,
self.config.get("modoboa", "dbuser"), self.config.get("modoboa", "dbuser"),
self.config.get("modoboa", "dbpassword"), self.config.get("modoboa", "dbpassword"),
self.dbhost, self.dbhost,