Security: This shouldn't have any impact on security
Performance: This shouldn't have any impact on performance
What's changed?
This was unnecessarily strict which made testing in development a bit harder than it needed to be.
Previously we were always trying to create a new teacher role in the school and responding with a 422 Unprocessalbe entity (with a validation error) if the user already had that role. Now we respond with 200 OK and leave the existing role in place. We also set TeacherInvitation#accepted_at if it hasn't already been set.
Status
336
RaspberryPiFoundation/editor-standalone#181
Points for consideration:
What's changed?
This was unnecessarily strict which made testing in development a bit harder than it needed to be.
Previously we were always trying to create a new teacher role in the school and responding with a 422 Unprocessalbe entity (with a validation error) if the user already had that role. Now we respond with 200 OK and leave the existing role in place. We also set
TeacherInvitation#accepted_at
if it hasn't already been set.Steps to perform after deploying to production
None.