diff --git a/pkg/api/playlist.go b/pkg/api/playlist.go index c053b4cb8d1..0b017d6e2cb 100644 --- a/pkg/api/playlist.go +++ b/pkg/api/playlist.go @@ -180,6 +180,7 @@ func CreatePlaylist(c *middleware.Context, cmd m.CreatePlaylistCommand) Response func UpdatePlaylist(c *middleware.Context, cmd m.UpdatePlaylistCommand) Response { cmd.OrgId = c.OrgId + if err := bus.Dispatch(&cmd); err != nil { return ApiError(500, "Failed to save playlist", err) } diff --git a/public/app/features/playlist/playlist_srv.ts b/public/app/features/playlist/playlist_srv.ts index c2106878b0f..0570a3bfc85 100644 --- a/public/app/features/playlist/playlist_srv.ts +++ b/public/app/features/playlist/playlist_srv.ts @@ -17,7 +17,9 @@ class PlaylistSrv { next() { this.$timeout.cancel(this.cancelPromise); - if (this.index > this.dashboards.length - 1) { + var playedAllDashboards = this.index > this.dashboards.length - 1; + + if (playedAllDashboards) { this.start(this.playlistId); } else { var dash = this.dashboards[this.index];