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