Less precise election results

This commit is contained in:
2017-01-10 19:06:34 +01:00
parent 766d913afe
commit e3711533da
3 changed files with 17 additions and 9 deletions

View File

@ -472,7 +472,7 @@ class CandidatureDeleteView(CanEditMixin, DeleteView):
def dispatch(self, request, *arg, **kwargs):
self.object = self.get_object()
self.election = self.object.role.election
if not self.election.can_candidate:
if not self.election.can_candidate or not self.election.is_vote_editable:
raise PermissionDenied
return super(CandidatureDeleteView, self).dispatch(request, *arg, **kwargs)