Changes between Version 1 and Version 2 of Ticket #35223
- Timestamp:
- Feb 16, 2024, 2:27:50 PM (9 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #35223 – Description
v1 v2 1 Starting to migrate models in my (large) project to use Django 5’s new db_defaultattribute for fields (using Django 5.0.2), encountering behavior contrary to my expectations.1 Starting to migrate models in my (large) project to use Django 5’s new {{{db_default}}} attribute for fields (using Django 5.0.2), encountering behavior contrary to my expectations. 2 2 3 3 A field with {{{db_default}}} raises a {{{ValidationError}}} when {{{full_clean()}}} called, if that field has been omitted from the {{{create()}}} call. … … 5 5 This is (to me) unexpected behavior. Would expect that no error would be raised, the instance would be saved successfully, with the specified {{{db_default}}} value set at the database level. 6 6 7 Has been explained to me in the Django forums that th isis correct, that I should instead either7 Has been explained to me in the Django forums that the {{{ValidationError}}} is correct, that I should instead either 8 8 9 9 (1) explicitly choose to {{{exclude}}} the missing fields from {{{full_clean()}}} call,