1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #35127 -- Made Model.full_clean() ignore GeneratedFields.

Thanks Claude Paroz for the report.

Regression in f333e3513e.
This commit is contained in:
Mariusz Felisiak
2024-01-19 08:55:50 +01:00
committed by GitHub
parent 8a1727dc7f
commit 4879907223
4 changed files with 14 additions and 3 deletions

View File

@@ -1628,7 +1628,7 @@ class Model(AltersData, metaclass=ModelBase):
errors = {}
for f in self._meta.fields:
if f.name in exclude:
if f.name in exclude or f.generated:
continue
# Skip validation for empty fields with blank=True. The developer
# is responsible for making sure they have a valid value.