mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-25 10:34:21 +00:00
Fix rights in election
This commit is contained in:
parent
177e39bd6e
commit
938e2ce0a9
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user