Skip to content
Snippets Groups Projects
Commit d6d28105 authored by Atte Keinänen's avatar Atte Keinänen
Browse files

Fix issue with sql template tag filters

parent ee59114c
No related branches found
No related tags found
No related merge requests found
......@@ -134,7 +134,8 @@ const getParameterFieldValuesByFieldId = (state, props) => {
// NOTE Atte Keinänen 9/14/17: Reading the state directly instead of using `getFields` selector
// because `getMetadata` doesn't currently work with fields of public dashboards
return _.chain(getIn(state, ["metadata", "fields"]))
.pick(getFields(state), ...props.parameter.field_ids)
// SQL template tags provide `field_id` instead of `field_ids`
.pick(...(props.parameter.field_ids || [props.parameter.field_id]))
.mapObject(getFieldValues)
.value()
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment