From 098811d3838f90e9248c8da613f87f9dc01d16a1 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 3 Jun 2021 17:17:57 +0100 Subject: [PATCH] fallback to first mode --- pandora/item/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pandora/item/views.py b/pandora/item/views.py index 62c6b21ae..9fbd39cbd 100644 --- a/pandora/item/views.py +++ b/pandora/item/views.py @@ -948,9 +948,11 @@ def timeline(request, id, size, position=-1, format='jpg', mode=None): if not item.access(request.user): return HttpResponseForbidden() + modes = [t['id'] for t in settings.CONFIG['timelines']] if not mode: mode = 'antialias' - modes = [t['id'] for t in settings.CONFIG['timelines']] + if mode not in modes: + mode = modes[0] if mode not in modes: raise Http404 modes.pop(modes.index(mode))