From b3d09cd2d404c9e3b7d2f7beff227a19b6e8067d Mon Sep 17 00:00:00 2001 From: kolaente Date: Mon, 28 Sep 2020 20:53:17 +0200 Subject: [PATCH] Fix loading list background information for uploaded backgrounds Signed-off-by: kolaente --- pkg/models/list.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/models/list.go b/pkg/models/list.go index 4c6515d2..52fb995a 100644 --- a/pkg/models/list.go +++ b/pkg/models/list.go @@ -402,7 +402,10 @@ func AddListDetails(lists []*List) (err error) { // Build it all into the lists slice for _, l := range lists { - l.BackgroundInformation = unsplashPhotos[l.BackgroundFileID] + // Only override the file info if we have info for unsplash backgrounds + if _, exists := unsplashPhotos[l.BackgroundFileID]; exists { + l.BackgroundInformation = unsplashPhotos[l.BackgroundFileID] + } } return