diff --git a/hypha/apply/funds/models/applications.py b/hypha/apply/funds/models/applications.py index a617a41b5d9f730cb29377dc228600f9df7e6b84..2e35e14621f20469a55cf62f1e70468ec245a161 100644 --- a/hypha/apply/funds/models/applications.py +++ b/hypha/apply/funds/models/applications.py @@ -356,11 +356,11 @@ class RoundBase(WorkflowStreamForm, SubmittableStreamForm): # type: ignore # Overriding serve method to pass submission id to get_form method copy_open_submission = request.GET.get('open_call_submission') if request.method == 'POST': - draft = bool(request.POST.get('draft')) + draft = request.POST.get('draft', None) form = self.get_form(request.POST, request.FILES, page=self, user=request.user) if form.is_valid(): - form_submission = self.process_form_submission(form, draft) + form_submission = self.process_form_submission(form, draft=draft) return self.render_landing_page(request, form_submission, *args, **kwargs) else: form = self.get_form(page=self, user=request.user, submission_id=copy_open_submission) diff --git a/hypha/apply/funds/models/utils.py b/hypha/apply/funds/models/utils.py index 18aa1e96e094306ce7bcf28a825230cfd6c11599..7d7f7e23bea961a457c15e3bc6ed13c05a884ffd 100644 --- a/hypha/apply/funds/models/utils.py +++ b/hypha/apply/funds/models/utils.py @@ -65,7 +65,7 @@ class SubmittableStreamForm(AbstractStreamForm): def get_submission_class(self): return self.submission_class - def process_form_submission(self, form, draft): + def process_form_submission(self, form, draft=False): if not form.user.is_authenticated: form.user = None if draft: