fix: prevent error when no file selected

This commit is contained in:
Jennifer Richards 2024-07-20 12:47:43 -07:00
parent 02baeef01f
commit 0555eef13a
No known key found for this signature in database
GPG key ID: 9B2BF5C5ADDA6A6E

View file

@ -2790,7 +2790,8 @@ class UploadOrEnterAgendaForm(UploadAgendaForm):
def clean_file(self):
submission_method = self.cleaned_data.get("submission_method")
if submission_method == "upload":
return super().clean_file()
if self.cleaned_data.get("file", None) is not None:
return super().clean_file()
return None
def clean(self):