mirror of
https://github.com/discourse/discourse.git
synced 2026-08-04 10:39:43 +08:00
`ModelStep` revalidates changed models by calling `invalid?`, which clears errors added by the model producer before validations run. For example, `UploadCreator` can return an unsaved `Upload` containing an image-processing error; `ModelStep` then clears that error and may treat the `Upload` as valid. Treat models that already contain errors as invalid without revalidating them. This preserves operation-specific errors for `on_model_errors` while continuing to validate changed models that do not already contain errors. --------- Co-authored-by: Loïc Guitaut <loic@discourse.org> |
||
|---|---|---|
| .. | ||
| developer-guides | ||
| ADMIN-QUICK-START-GUIDE.md | ||
| AUTHORS.md | ||
| code-of-conduct.md | ||
| INSTALL-cloud.md | ||
| INSTALL-email.md | ||
| INSTALL.md | ||
| PLUGINS.md | ||
| SECURITY.md | ||
| TESTING.md | ||