Skip to content

Commit

Permalink
Merge pull request #414 from fizyk/allow-override_db_schemes_children
Browse files Browse the repository at this point in the history
Access DB_SCHEMES through cls rather than Env in db_url_config.
  • Loading branch information
sergeyklay committed Sep 20, 2022
2 parents 78076b3 + b30e56d commit c2b35db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions environ/environ.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,8 +591,8 @@ def db_url_config(cls, url, engine=None):
else:
config['ENGINE'] = url.scheme

if config['ENGINE'] in Env.DB_SCHEMES:
config['ENGINE'] = Env.DB_SCHEMES[config['ENGINE']]
if config['ENGINE'] in cls.DB_SCHEMES:
config['ENGINE'] = cls.DB_SCHEMES[config['ENGINE']]

if not config.get('ENGINE', False):
warnings.warn("Engine not recognized from url: {}".format(config))
Expand Down

0 comments on commit c2b35db

Please sign in to comment.