From 4bf206ad4823828282d924122c5e46559acfdc8f Mon Sep 17 00:00:00 2001 From: nhnn Date: Wed, 10 Jul 2024 17:18:55 +0300 Subject: [PATCH] fix: dicts are indexed via [] --- selfprivacy_api/utils/prometheus.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfprivacy_api/utils/prometheus.py b/selfprivacy_api/utils/prometheus.py index e4c2dc2..ab816be 100644 --- a/selfprivacy_api/utils/prometheus.py +++ b/selfprivacy_api/utils/prometheus.py @@ -37,7 +37,7 @@ class PrometheusQueries: raise Exception("Prometheus returned unexpected HTTP status code") json = response.json() return PrometheusQueryResult( - result_type=json.result_type, result=json.result + result_type=json['result_type'], result=json['result'] ) except Exception as error: raise Exception("Prometheus request failed! " + str(error))