year might not be int

This commit is contained in:
j 2019-11-20 13:55:59 +01:00
parent df46b872fe
commit 41b9f36fb7

View file

@ -53,7 +53,10 @@ def render_poster(data, poster):
font_size_small = 32
font_size_large = 48
font_file = os.path.join(static_root, 'MontserratBold.ttf')
try:
hue = int(year) % 100 * 3.6
except:
hue = int(0) % 100 * 3.6
image_color = getRGB([hue, 1, 0.2])
background_color = getRGB([hue, 1, 0.4])
foreground_color = getRGB([hue, 1, 0.8])