mirror of
https://github.com/cwinfo/powerdns-admin.git
synced 2024-11-09 15:10:27 +00:00
Fix handling of passwords with % in the SQLALCHEMY_DATABASE_URI
Fix Flask-Migrate ValueError from occurring when a password has '%' characters in it when specified via SQLALCHEMY_DATABASE_URI.
This commit is contained in:
parent
f6289d140c
commit
25ebbf132c
@ -19,7 +19,7 @@ logger = logging.getLogger('alembic.env')
|
||||
# target_metadata = mymodel.Base.metadata
|
||||
from flask import current_app
|
||||
config.set_main_option('sqlalchemy.url',
|
||||
current_app.config.get('SQLALCHEMY_DATABASE_URI'))
|
||||
current_app.config.get('SQLALCHEMY_DATABASE_URI').replace("%","%%"))
|
||||
target_metadata = current_app.extensions['migrate'].db.metadata
|
||||
|
||||
# other values from the config, defined by the needs of env.py,
|
||||
|
Loading…
Reference in New Issue
Block a user