Fix synthesis upload
This commit is contained in:
parent
30a0e63eb9
commit
de504a1706
|
@ -222,7 +222,7 @@ class SynthesisForm(forms.ModelForm):
|
|||
|
||||
class Meta:
|
||||
model = Synthesis
|
||||
fields = ('type', 'file',)
|
||||
fields = ('file',)
|
||||
|
||||
|
||||
class NoteForm(forms.ModelForm):
|
||||
|
|
|
@ -739,7 +739,7 @@ class SynthesisUploadView(LoginRequiredMixin, FormView):
|
|||
self.participation = self.request.user.registration.team.participation
|
||||
self.passage = qs.get()
|
||||
|
||||
if self.participation not in [self.passage.defender, self.passage.opponent, self.passage.reporter]:
|
||||
if self.participation not in [self.passage.opponent, self.passage.reporter]:
|
||||
return self.handle_no_permission()
|
||||
|
||||
return super().dispatch(request, *args, **kwargs)
|
||||
|
@ -751,6 +751,7 @@ class SynthesisUploadView(LoginRequiredMixin, FormView):
|
|||
It is discriminating whenever the team is selected for the final tournament or not.
|
||||
"""
|
||||
form_syn = form.instance
|
||||
form_syn.type = 1 if self.participation == self.passage.opponent else 2
|
||||
syn_qs = Synthesis.objects.filter(participation=self.participation,
|
||||
passage=self.passage,
|
||||
type=form_syn.type).all()
|
||||
|
|
|
@ -414,7 +414,7 @@ msgstr "solutions"
|
|||
#: apps/participation/models.py:594
|
||||
#, python-brace-format
|
||||
msgid "Synthesis for the {type} of the {passage}"
|
||||
msgstr "Synthèse pour {type} du {passage}"
|
||||
msgstr "Synthèse de {type} du {passage}"
|
||||
|
||||
#: apps/participation/models.py:597
|
||||
msgid "synthesis"
|
||||
|
|
Loading…
Reference in New Issue