Commit 938e2ce0 authored by Sli's avatar Sli

Fix rights in election

parent 177e39bd
......@@ -134,9 +134,6 @@ class CandidatureCreateView(CanCreateMixin, FormView):
data = form.clean()
res = super(FormView, self).form_valid(form)
data['election'] = Election.objects.get(id=self.election_id)
if data['user'].is_root:
self.create_candidature(data)
return res
for grp in data['election'].candidature_groups.all():
if data['user'].is_in_group(grp):
self.create_candidature(data)
......
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