From 0f99dbe1d28c22e43e04aeb1a95d2c95a273fb77 Mon Sep 17 00:00:00 2001 From: Chris Meyers Date: Fri, 18 Mar 2016 10:55:23 -0400 Subject: [PATCH] fixes MONGO_HOST not found error --- awx/fact/models/fact.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/awx/fact/models/fact.py b/awx/fact/models/fact.py index 87cc3e1671..f52abe1106 100644 --- a/awx/fact/models/fact.py +++ b/awx/fact/models/fact.py @@ -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"))