Просмотр исходного кода

Merge pull request #11595 from kichristensen/DeleteEmptyPlaylist

Support deleting empty playlist
Daniel Lee 7 лет назад
Родитель
Сommit
bb7a6a0153
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      pkg/api/playlist.go

+ 1 - 1
pkg/api/playlist.go

@@ -33,7 +33,7 @@ func ValidateOrgPlaylist(c *m.ReqContext) {
 		return
 	}
 
-	if len(items) == 0 {
+	if len(items) == 0 && c.Context.Req.Method != "DELETE" {
 		c.JsonApiErr(404, "Playlist is empty", itemsErr)
 		return
 	}