Ticket #20205: patch_ticket20205.txt

File patch_ticket20205.txt, 436 bytes (added by Areski Belaid, 11 years ago)

Patch for ticket 20205 fix for empty values allowed on IntegerField

Line 
1diff --git a/django/db/models/fields/__init__.py b/django/db/models/fields/__init__.py
2index a925f0c..2ff180b 100644
3--- a/django/db/models/fields/__init__.py
4+++ b/django/db/models/fields/__init__.py
5@@ -1028,6 +1028,7 @@ class FloatField(Field):
6
7 class IntegerField(Field):
8 empty_strings_allowed = False
9+ empty_values = [None]
10 default_error_messages = {
11 'invalid': _("'%s' value must be an integer."),
12 }
Back to Top