Skip to content

Commit 403a922

Browse files
soonannamotl
authored andcommitted
fix: variable datasources shown as missing datasource
1 parent 54f8a2b commit 403a922

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

grafana_wtf/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -663,10 +663,10 @@ def add(item):
663663
# Datasources defined as variables.
664664
if "type" in node and node["type"] == "datasource":
665665
values = to_list(node.get("current", {}).get("value"))
666-
for ds_name in values:
667-
datasource = self.datasource_by_name.get(ds_name)
666+
for ds_uid in values:
667+
datasource = self.datasource_by_uid.get(ds_uid)
668668
if datasource is None:
669-
log.warning(f"Data source '{ds_name}' not found")
669+
log.warning(f"Data source '{ds_uid}' not found")
670670
continue
671671
ds = dict(
672672
type=datasource.get("type"),

0 commit comments

Comments
 (0)