mirror of
https://github.com/ansible/awx.git
synced 2026-04-10 20:49:24 -02:30
fixes MONGO_HOST not found error
This commit is contained in:
@@ -35,7 +35,7 @@ def _get_db_monkeypatched(cls):
|
|||||||
password=settings.MONGO_PASSWORD,
|
password=settings.MONGO_PASSWORD,
|
||||||
tz_aware=settings.USE_TZ)
|
tz_aware=settings.USE_TZ)
|
||||||
register_key_transform(get_db())
|
register_key_transform(get_db())
|
||||||
except ConnectionError:
|
except (ConnectionError, AttributeError):
|
||||||
logger.info('Failed to establish connect to MongoDB')
|
logger.info('Failed to establish connect to MongoDB')
|
||||||
return get_db(cls._meta.get("db_alias", "default"))
|
return get_db(cls._meta.get("db_alias", "default"))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user