fix: prevent error when no file selected
This commit is contained in:
parent
02baeef01f
commit
0555eef13a
|
@ -2790,7 +2790,8 @@ class UploadOrEnterAgendaForm(UploadAgendaForm):
|
||||||
def clean_file(self):
|
def clean_file(self):
|
||||||
submission_method = self.cleaned_data.get("submission_method")
|
submission_method = self.cleaned_data.get("submission_method")
|
||||||
if submission_method == "upload":
|
if submission_method == "upload":
|
||||||
return super().clean_file()
|
if self.cleaned_data.get("file", None) is not None:
|
||||||
|
return super().clean_file()
|
||||||
return None
|
return None
|
||||||
|
|
||||||
def clean(self):
|
def clean(self):
|
||||||
|
|
Loading…
Reference in a new issue