From aae1bc3cabbaa7f4feb951428bbf4a20a8158b44 Mon Sep 17 00:00:00 2001 From: kolaente Date: Fri, 29 May 2020 22:12:16 +0200 Subject: [PATCH] Load the list when setting a background --- pkg/modules/background/handler/background.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkg/modules/background/handler/background.go b/pkg/modules/background/handler/background.go index c208c8a3..58a094cc 100644 --- a/pkg/modules/background/handler/background.go +++ b/pkg/modules/background/handler/background.go @@ -86,6 +86,10 @@ func (bp *BackgroundProvider) SetBackground(c echo.Context) error { log.Infof("Tried to update list background of list %d while not having the rights for it (User: %v)", listID, auth) return echo.NewHTTPError(http.StatusForbidden) } + // Load the list + if err := list.GetSimpleByID(); err != nil { + return handler.HandleHTTPError(err, c) + } image := &background.Image{} err = c.Bind(image)