mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
DashboardExport: Correctly templetatize datasource prop now that is's a ref obj (#42305)
This commit is contained in:
@@ -116,7 +116,11 @@ export class DashboardExporter {
|
||||
pluginName: ds.meta?.name,
|
||||
};
|
||||
|
||||
obj.datasource = '${' + refName + '}';
|
||||
if (obj.datasource === null || typeof obj.datasource === 'string') {
|
||||
obj.datasource = '${' + refName + '}';
|
||||
} else {
|
||||
obj.datasource.uid = '${' + refName + '}';
|
||||
}
|
||||
})
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user