Skip to content

Commit

Permalink
fix(apache#23176): adding URL decoding to SQLAlchemy URI (apache#23421)
Browse files Browse the repository at this point in the history
Co-authored-by: Evan Rusackas <evan@preset.io>
  • Loading branch information
RekhaZemoso and rusackas authored Apr 6, 2023
1 parent 8ef49a5 commit 8f03280
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion superset/migrations/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
# specific language governing permissions and limitations
# under the License.
import logging
import urllib.parse
from logging.config import fileConfig
from typing import List

Expand Down Expand Up @@ -42,7 +43,8 @@
"SQLite Database support for metadata databases will \
be removed in a future version of Superset."
)
config.set_main_option("sqlalchemy.url", DATABASE_URI)
decoded_uri = urllib.parse.unquote(DATABASE_URI)
config.set_main_option("sqlalchemy.url", decoded_uri)
target_metadata = Base.metadata # pylint: disable=no-member


Expand Down

0 comments on commit 8f03280

Please sign in to comment.