summaryrefslogtreecommitdiff
path: root/tests/one_to_one
diff options
context:
space:
mode:
authorAlasdair Nicol <alasdair@thenicols.net>2013-08-11 21:19:09 +0100
committerTim Graham <timograham@gmail.com>2013-08-15 19:47:26 -0400
commit22c6497f990fd12359b759a71abfcbf3f52b2d52 (patch)
treec04062583cf2cffabc193e635542fa91d99e163e /tests/one_to_one
parent55339a76691724109770092976e660ac62358bc5 (diff)
downloaddjango-22c6497f990fd12359b759a71abfcbf3f52b2d52.tar.gz
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.
Diffstat (limited to 'tests/one_to_one')
-rw-r--r--tests/one_to_one/models.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/one_to_one/models.py b/tests/one_to_one/models.py
index 9599496cb7..ff809be22d 100644
--- a/tests/one_to_one/models.py
+++ b/tests/one_to_one/models.py
@@ -22,8 +22,8 @@ class Place(models.Model):
@python_2_unicode_compatible
class Restaurant(models.Model):
place = models.OneToOneField(Place, primary_key=True)
- serves_hot_dogs = models.BooleanField()
- serves_pizza = models.BooleanField()
+ serves_hot_dogs = models.BooleanField(default=False)
+ serves_pizza = models.BooleanField(default=False)
def __str__(self):
return "%s the restaurant" % self.place.name