Little permission fix

This commit is contained in:
klmp200 committed 2016-12-25 22:04:31 +01:00
1 parent e17fd22a37
commit 5449a4fca2
2 files changed
+3 -1

No files matched your search

+1 -1
View File
@@ -289,7 +289,7 @@ class RoleCreateView(CanCreateMixin, CreateView):
def dispatch(self, request, *arg, **kwargs):
self.election = get_object_or_404(Election, pk=kwargs['election_id'])
if self.election.is_vote_editable:
if not self.election.is_vote_editable:
raise PermissionDenied
return super(RoleCreateView, self).dispatch(request, *arg, **kwargs)