Fixed snapshot sharing issue

This commit is contained in:
Torkel Ödegaard
2015-03-27 06:47:58 +01:00
parent 7be7aeb70a
commit d3db49ae3e
3 changed files with 7 additions and 3 deletions

View File

@@ -15,7 +15,7 @@ import (
func CreateDashboardSnapshot(c *middleware.Context, cmd m.CreateDashboardSnapshotCommand) {
if cmd.External {
// external snapshot ref requires key and delete key
if cmd.Key != "" && cmd.DeleteKey != "" {
if cmd.Key == "" || cmd.DeleteKey == "" {
c.JsonApiErr(400, "Missing key and delete key for external snapshot", nil)
return
}