Merge pull request #4606 from influxdata/hotfix-handle-map-template-variables-correctly

Match by key when tempvar is a map type
pull/4607/head
Brandon Farmer 2018-10-17 11:10:50 -07:00 committed by GitHub
commit 04e89f7a6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -697,7 +697,14 @@ export const getDashboardWithTemplatesAsync = (
_.each(selections, (val, key) => {
const result = _.some(
templates,
temp => temp.tempVar === key && _.some(temp.values, v => v.value === val)
temp =>
temp.tempVar === key &&
_.some(temp.values, v => {
if (v.key) {
return v.key === val
}
return v.value === val
})
)
if (!result) {