Changes between Version 2 and Version 3 of Ticket #35575
- Timestamp:
- Jul 3, 2024, 6:32:47 AM (6 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #35575 – Description
v2 v3 1 `GeneratedField`s on a model instance are not recalculated during `Model.full_clean()`. Therefore, if a `GeneratedField` is included in the `*expressions` or `fields` parameters of a `UniqueConstraint` or `CheckConstraint` in the instance's `Model._meta`, the new values of the `GeneratedField` attribute are not u aed by `BaseConstraint.validate()`.1 `GeneratedField`s on a model instance are not recalculated during `Model.full_clean()`. Therefore, if a `GeneratedField` is included in the `*expressions` or `fields` parameters of a `UniqueConstraint` or `CheckConstraint` in the instance's `Model._meta`, the new values of the `GeneratedField` attribute are not used by `BaseConstraint.validate()`. 2 2 3 3 Instead, the model instance's `GeneratedField` attribute will return the value which corresponds to the most recent refresh of the instance from the database. If the instance is new and has not yet been saved, the following error is raised: