Open EdoStorm96 opened 6 months ago
The actual bug here is the creator not being forcibly added to applicants
. (Or, that happening only after validation).
The creator MUST AND SHALL always be listed in applicants
. The portal will break in weird ways if that's not the case.
The form is (mostly) doing what it should to enforce that.
(Hell, I'd even say we should patch Proposal.save()
to enforce this constraint, seeing how important it is).
This is a bit of a weird bug. Not a huge deal, but not ideal. So when you remove all users from
applicants
and then setother_applicants
toFalse
, which is kind off intuitive, if you want to setother_applicants
to False, you cause a bug. You cannot continue with the proposal by clicking save & continue. It won´t show an error message to indicate what is going on, because that is hidden. Normally,applicants
will always contain at least the user, as that is provided as an initial value inProposalCreate.get_initial()
. If you try to navigate with the stepper, when this occurs, you also crash the form´sclean()
.