From 45c5a0f682b2c49271b2eaf4c9a20798da07f098 Mon Sep 17 00:00:00 2001 From: Fluffy-Bean Date: Sun, 2 Apr 2023 21:15:24 +0000 Subject: [PATCH] Crashing on empty groups --- gallery/routes/groups.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gallery/routes/groups.py b/gallery/routes/groups.py index 48def48..58a115d 100644 --- a/gallery/routes/groups.py +++ b/gallery/routes/groups.py @@ -78,7 +78,7 @@ def group(group_id): # Check contrast for the first image in the group for the banner text_colour = 'rgb(var(--fg-black))' - if images[0]: + if images: text_colour = contrast.contrast(images[0].image_colours[0], 'rgb(var(--fg-black))', 'rgb(var(--fg-white))')