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
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -402,8 +402,11 @@ func AddListDetails(lists []*List) (err error) {
// Build it all into the lists slice // Build it all into the lists slice
for _, l := range lists { for _, l := range lists {
// Only override the file info if we have info for unsplash backgrounds
if _, exists := unsplashPhotos[l.BackgroundFileID]; exists {
l.BackgroundInformation = unsplashPhotos[l.BackgroundFileID] l.BackgroundInformation = unsplashPhotos[l.BackgroundFileID]
} }
}
return return
} }