database: fix CreateDatabase function

This commit is contained in:
Izalia Mae 2021-04-29 13:12:21 -04:00
parent 096dfd159b
commit d0bf77cade

View file

@ -82,7 +82,7 @@ class DataBase():
def CreateDatabase(self):
if self.engine_string.startswith('postgresql'):
if self.db.url.get_backend_name() == 'postgresql':
predb = create_engine(db.engine_string.replace(config.db.name, 'postgres', -1))
conn = predb.connect()
conn.execute('commit')