mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 01:25:16 +00:00
Merge pull request #2308 from getredash/fix_params
Fix: parameters list was resetting when adding a new parameter
This commit is contained in:
commit
953efc472f
@ -102,6 +102,8 @@ class Parameters {
|
||||
parameters = uniq(collectParams(parts));
|
||||
} catch (e) {
|
||||
logger('Failed parsing parameters: ', e);
|
||||
// Return current parameters so we don't reset the list
|
||||
parameters = pluck(this.query.options.parameters, 'name');
|
||||
}
|
||||
return parameters;
|
||||
}
|
||||
@ -123,13 +125,13 @@ class Parameters {
|
||||
|
||||
parameterNames.forEach((param) => {
|
||||
if (!has(parametersMap, param)) {
|
||||
this.query.options.parameters.push({
|
||||
this.query.options.parameters.push(new Parameter({
|
||||
title: param,
|
||||
name: param,
|
||||
type: 'text',
|
||||
value: null,
|
||||
global: false,
|
||||
});
|
||||
}));
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user