From 4911d713a5e04c1b07c1b563ba65afbb935f992b Mon Sep 17 00:00:00 2001 From: James Chuong Date: Tue, 29 May 2018 18:54:16 -0700 Subject: [PATCH] Fix import metrics in notifications/messaging.py (#1254) `from lemur import metrics` is incorrect for notifications/messaging.py because that is importing the `metrics` module rather than the instanciated `lemur.extensions.metrics` object. This will cause errors if you import notifications/messaging.py elsewhere, since it can cause circular dependencies. Change-Id: Ice28c480373601420fc83bae2d27bb6467cdb752 --- lemur/notifications/messaging.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lemur/notifications/messaging.py b/lemur/notifications/messaging.py index 6096f9ef..111c9e2e 100644 --- a/lemur/notifications/messaging.py +++ b/lemur/notifications/messaging.py @@ -17,9 +17,9 @@ from flask import current_app from sqlalchemy import and_ -from lemur import database, metrics +from lemur import database from lemur.constants import FAILURE_METRIC_STATUS, SUCCESS_METRIC_STATUS -from lemur.extensions import sentry +from lemur.extensions import metrics, sentry from lemur.common.utils import windowed_query from lemur.certificates.schemas import certificate_notification_output_schema