From 2fc9c6ca58cb6df332976d1414614abb9f8a2f9e Mon Sep 17 00:00:00 2001 From: wengelbrecht-grafana <83230950+wengelbrecht-grafana@users.noreply.github.com> Date: Thu, 13 May 2021 23:39:43 +0100 Subject: [PATCH] Fix key and deleteKey being ignored when creating a snapshot with external=true set (#33686) * Update dashboard_snapshot.go This is to address: https://github.com/grafana/grafana/issues/33665 The key and deleteKey fields are not honoured when creating a snapshot with external:true set * removed whitespace --- pkg/api/dashboard_snapshot.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/api/dashboard_snapshot.go b/pkg/api/dashboard_snapshot.go index 3bf2158d99c..331609141c5 100644 --- a/pkg/api/dashboard_snapshot.go +++ b/pkg/api/dashboard_snapshot.go @@ -44,6 +44,8 @@ func createExternalDashboardSnapshot(cmd models.CreateDashboardSnapshotCommand) "name": cmd.Name, "expires": cmd.Expires, "dashboard": cmd.Dashboard, + "key": cmd.Key, + "deleteKey": cmd.DeleteKey, } messageBytes, err := simplejson.NewFromAny(message).Encode()