Fix loading list background information for uploaded backgrounds

Signed-off-by: kolaente <k@knt.li>
This commit is contained in:
kolaente 2020-09-28 20:53:17 +02:00
parent 64d125afd9
commit b3d09cd2d4
Signed by untrusted user: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 4 additions and 1 deletions

View File

@ -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