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

Fixed #12030 -- Validate integer field range at the model level.

Thanks to @timgraham for the review.
This commit is contained in:
Simon Charette
2014-03-03 20:12:42 -05:00
parent 9b7ba8af1b
commit 1506c71a95
8 changed files with 153 additions and 26 deletions

View File

@@ -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
^^^^^^^