Commit d89b4899 authored by Luuk Scholten's avatar Luuk Scholten
Browse files

Merge branch 'hotfix/1.2.1-fix-showcased-partners-missing-id' into 'release/1.2'

🚑 Fix 500 error when trying to display showcased partner that is removed

See merge request !306
parents 18239156 d38b119a
......@@ -13,6 +13,10 @@ def showcased_partners(request):
chosen, rest = sequence[:2], sequence[2:]
request.session['partner_sequence'] = rest + chosen
partners = tuple(Partner.objects.get(id=id) for id in chosen)
except Partner.DoesNotExist:
del request.session['partner_sequence']
return showcased_partners(request)
return {'showcased_partners': partners}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment