mirror of
https://github.com/django/django.git
synced 2025-09-26 12:09:19 +00:00
[1.7.x] Fixed #12030 -- Validate integer field range at the model level.
Thanks to @timgraham for the review.
Backport of 1506c71a95
from master
This commit is contained in:
parent
7eaf329ad3
commit
78211b13a5
8 changed files with 153 additions and 26 deletions
|
@ -678,6 +678,11 @@ Models
|
|||
Previously this used to work if the field accepted integers as input as it
|
||||
took the primary key.
|
||||
|
||||
* Integer fields are now validated against database backend specific min and
|
||||
max values based on their :meth:`internal_type <django.db.models.Field.get_internal_type>`.
|
||||
Previously model field validation didn't prevent values out of their associated
|
||||
column data type range from being saved resulting in an integrity error.
|
||||
|
||||
Signals
|
||||
^^^^^^^
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue