allow postgresql:// connection string

Due to popular demand ;-), also allow postgresl://
This commit is contained in:
Sebastian Spaeth 2023-02-02 07:42:16 +01:00
parent 6f99a37944
commit 4fad9fcb0d

View File

@ -109,7 +109,7 @@ class MediaRepository:
def connect_db(self):
#postgresql://user:pass@localhost/database?params
if self.db_conn_string is None or not self.db_conn_string.startswith("postgres://"):
if self.db_conn_string is None or not self.db_conn_string.startswith(("postgres://","postgresql://")):
errstr = "DB connection not a postgres one"
logging.error(errstr)
raise ValueError(errstr)