fix: dicts are indexed via []

This commit is contained in:
nhnn 2024-07-10 17:18:55 +03:00
parent aa2a7ff3aa
commit 4bf206ad48

View file

@ -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))