Verified Commit 7c734bad authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Fix the wiki login

parent f01d8235
...@@ -45,11 +45,12 @@ def wiki_login(request): ...@@ -45,11 +45,12 @@ def wiki_login(request):
user = authenticate(username=user, password=password) user = authenticate(username=user, password=password)
if user is not None: if user is not None:
memberships = [ memberships = [
cmm.committee.wiki_namespace for cmm in for x in
user.membergroupmembership_set user.membergroupmembership_set
.exclude( .exclude(
.select_related('group') .select_related('group')
if cmm.committee.wiki_namespace is not None] if hasattr(, 'committee') and is not None]
if user.has_perm('activemembers.board_wiki'): if user.has_perm('activemembers.board_wiki'):
memberships.append('bestuur') memberships.append('bestuur')
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