Commit 9fa63333 authored by Jelle Besseling's avatar Jelle Besseling
Browse files

Change catchall exception with specific exception

parent 862cffdb
......@@ -7,12 +7,12 @@ from random import random
def index(request):
partners = Partner.objects.filter(is_active=True, is_main_partner=False)
try:
main_parter = Partner.objects.get(
main_partner = Partner.objects.get(
is_active=True,
is_main_partner=True
)
except:
mainpartner = None
except Partner.DoesNotExist:
main_partner = None
context = {
'main_partner': main_partner,
......
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