GSA-TTS / FAC

GSA's Federal Audit Clearinghouse
Other
19 stars 5 forks source link

FAC - Bug: Missing fields from manage access form creates 500 errors #3737

Open timoballard opened 6 months ago

timoballard commented 6 months ago

Describe the bug

When submitting the form to add or edit submission Access, omitting either or both of the fields (New name, New email address) will result in a 500 error response from the server.

Here is an example in New Relic

Steps to reproduce the bug

  1. Go to the Manage report access page for a submission
  2. Click Edit next to an existing editor or Add editor at the bottom
  3. Submit the form with one or both of the two fields left blank
  4. See error

Expected Behavior

In these cases, we should use Django form cleaning/validation to check for the required fields, and, if any are not present, return a descriptive error message that is displayed near the form fields in question

Screenshots

No response

System setup

No response

Additional context

No response

Code of Conduct

rnovak338 commented 1 month ago

@phildominguez-gsa Just now looking at this one. This is solved already through your PR here no? I haven't been able to recreate a 500.

The only thing I am going to tweak is on the zero-state for creating a new access to the SAC, both fields are prepopulated with "None" rather than blank. I am simply going to use an empty string "" for these fields in the template rather than None.

Image