You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Somewhat surprisingly there is currently no validation for the presence
of `name` on the `Project` model itself, although I suspect the name is
probably implicitly guaranteed not to be blank by the clients of
editor-api.
Since admin users in experience-cs are going to be entering the name
manually in the administrate UI, I want to protect against a blank name
and I want to be able to provide a sensible error message if none is
set.
Ideally I'd add a validation to the `Project` model itself. However,
since I don't have access [1] to staging or production data for
`editor-api`, I can't be sure that some existing projects would become
invalid. So as before I've added the validation to the `PublicProject`
wrapper class which means the validation will only be used in the
context of the `Api::PublicProjectsController`.
[1]: https://raspberrypifoundation.slack.com/archives/C08831T17H6/p1747900618263229
0 commit comments