Commit c96bfffa authored by Luuk Scholten's avatar Luuk Scholten

Make sure that anonymous users can view events

The AnonymousUser object doesn't have a `member` property.
It was contained in a try-catch, so also ocatch AttributeError.
Fix #119
parent 010c377d
......@@ -166,7 +166,7 @@ def event(request, event_id):
member=request.user.member
)
context['registration'] = registration
except Registration.DoesNotExist:
except (Registration.DoesNotExist, AttributeError):
pass
return render(request, 'events/event.html', context)
......
Markdown is supported
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