mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Templating : return __empty__ value when all value return nothing to prevent elasticsearch syntaxe error (#9701)
This commit is contained in:
parent
bdb736a9ee
commit
1888708ca5
@ -74,6 +74,9 @@ export class TemplateSrv {
|
||||
if (typeof value === 'string') {
|
||||
return luceneEscape(value);
|
||||
}
|
||||
if (value instanceof Array && value.length === 0) {
|
||||
return '__empty__';
|
||||
}
|
||||
var quotedValues = _.map(value, function(val) {
|
||||
return '"' + luceneEscape(val) + '"';
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user