Code

Ticket #9640: patch.diff

File patch.diff, 554 bytes (added by fperetti, 5 years ago)

New patch, now must work!

Line 
1Index: django/db/models/fields/__init__.py
2===================================================================
3--- django/db/models/fields/__init__.py (revisión: 10130)
4+++ django/db/models/fields/__init__.py (copia de trabajo)
5@@ -371,7 +371,7 @@
6 
7 class BooleanField(Field):
8     def __init__(self, *args, **kwargs):
9-        kwargs['blank'] = True
10+        kwargs['blank'] = not 'choices' in kwargs
11         if 'default' not in kwargs and not kwargs.get('null'):
12             kwargs['default'] = False
13         Field.__init__(self, *args, **kwargs)