From 4787a924f117e8f0c2fcbd56be0fbb04ddee3c97 Mon Sep 17 00:00:00 2001 From: GowthamShanmugasundaram Date: Wed, 4 Apr 2018 11:00:08 +0530 Subject: [PATCH] Modified code as per review comment tendrl-bug-id: Tendrl/gluster-integration#598 Signed-off-by: GowthamShanmugasundaram --- tendrl/gluster_integration/sds_sync/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tendrl/gluster_integration/sds_sync/__init__.py b/tendrl/gluster_integration/sds_sync/__init__.py index 1acce57..b63b6b6 100644 --- a/tendrl/gluster_integration/sds_sync/__init__.py +++ b/tendrl/gluster_integration/sds_sync/__init__.py @@ -828,10 +828,10 @@ def update_cluster_alert_count(): severity = ["WARNING", "CRITICAL"] try: alert_counts = get_volume_alert_counts() - alerts_arr = NS.tendrl.objects.ClusterAlert( + alerts = NS.tendrl.objects.ClusterAlert( tags={'integration_id': NS.tendrl_context.integration_id} ).load_all() - for alert in alerts_arr: + for alert in alerts: alert.tags = json.loads(alert.tags) if alert.severity in severity: cluster_alert_count += 1