mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fix(templating): fixed duplicate button bug, fixes #6652
This commit is contained in:
parent
34790e1fab
commit
2a33594c02
@ -106,7 +106,7 @@ export class VariableEditorCtrl {
|
||||
};
|
||||
|
||||
$scope.duplicate = function(variable) {
|
||||
var clone = _.cloneDeep(variable.getModel());
|
||||
var clone = _.cloneDeep(variable.getSaveModel());
|
||||
$scope.current = variableSrv.createVariableFromModel(clone);
|
||||
$scope.variables.push($scope.current);
|
||||
$scope.current.name = 'copy_of_'+variable.name;
|
||||
|
Loading…
Reference in New Issue
Block a user