[ENG-6242] Resolve issue with updating preprint fields and validation errors
Purpose
Fix form validation issues in the preprint model and serializer.
Changes
- Updated preprint model to correctly handle validation.
- Modified serializer logic to properly manage field validation.
Ticket
@uditijmehta Could you resolve the conflicts by merging master into this branch?
Late to the CR party, one suggestion and one potential blocker?
- I think we can remove
handle_author_assertions()since we have removed the only usage of it. - One crucial part in
handle_author_assertions()was not ported to the "expanded"ifstatements: admin permission check. This is not testable by QA due to the assertion page disabled by FE but I think WRITE contributor can use API to change it. Probably a blocker?
@cslzchen So we need to make sure to require admin permissions to do author assertions before we move forward is the suggestion?
Yes, I think so.
@uditijmehta Could you make that change, and also add a test for that case?
New changes seem good to me. @cslzchen?
I cherry-picked 6 commits (and force pushed back) since the original branch has develop changes which should not be released to production.
Original branch has been backed up in https://github.com/cslzchen/osf.io/tree/hotfix/form-validation-issues-backup.