mirror of
https://github.com/django/django.git
synced 2025-10-24 14:16:09 +00:00
Fixed #20895 -- Made check management command warn if a BooleanField does not have a default value
Thanks to Collin Anderson for the suggestion and Tim Graham for reviewing the patch.
This commit is contained in:
committed by
Tim Graham
parent
55339a7669
commit
22c6497f99
@@ -20,8 +20,8 @@ class Place(models.Model):
|
||||
|
||||
@python_2_unicode_compatible
|
||||
class Restaurant(Place):
|
||||
serves_sushi = models.BooleanField()
|
||||
serves_steak = models.BooleanField()
|
||||
serves_sushi = models.BooleanField(default=False)
|
||||
serves_steak = models.BooleanField(default=False)
|
||||
|
||||
def __str__(self):
|
||||
return "%s the restaurant" % self.name
|
||||
|
||||
Reference in New Issue
Block a user