Skip to content

Commit a2c13b7

Browse files
committed
Make sure all BooleanFields have an explicit default value (with
Django < 1.6 it used to be False implicitly) - Legacy-Id: 6908
1 parent dec6862 commit a2c13b7

3 files changed

Lines changed: 9 additions & 9 deletions

File tree

ietf/doc/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,7 @@ class StateDocEvent(DocEvent):
590590
state = models.ForeignKey(State, blank=True, null=True)
591591

592592
class ConsensusDocEvent(DocEvent):
593-
consensus = models.BooleanField()
593+
consensus = models.BooleanField(default=False)
594594

595595
# IESG events
596596
class BallotType(models.Model):

ietf/ipr/models.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,17 @@ class IprDetail(models.Model):
7272
lic_opt_b_sub = models.IntegerField(null=True, editable=False, choices=STDONLY_CHOICES)
7373
lic_opt_c_sub = models.IntegerField(null=True, editable=False, choices=STDONLY_CHOICES)
7474
comments = models.TextField("Licensing Comments", blank=True)
75-
lic_checkbox = models.BooleanField("All terms and conditions has been disclosed")
75+
lic_checkbox = models.BooleanField("All terms and conditions has been disclosed", default=False)
7676

7777

7878
# Other notes fieldset
7979
other_notes = models.TextField(blank=True)
8080

8181
# Generated fields, not part of the submission form
8282
# Hidden fields
83-
third_party = models.BooleanField()
84-
generic = models.BooleanField()
85-
comply = models.BooleanField()
83+
third_party = models.BooleanField(default=False)
84+
generic = models.BooleanField(default=False)
85+
comply = models.BooleanField(default=False)
8686

8787
status = models.IntegerField(null=True, blank=True, choices=STATUS_CHOICES)
8888
submitted_date = models.DateField(blank=True)

ietf/nomcom/models.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ class NomCom(models.Model):
3838
upload_to=upload_path_handler, blank=True, null=True)
3939

4040
group = models.ForeignKey(Group)
41-
send_questionnaire = models.BooleanField(verbose_name='Send automatically questionnaires"',
42-
help_text='If you check this box, questionnaires are sent automatically after nominations')
43-
reminder_interval = models.PositiveIntegerField(help_text='If the nomcom user the interval field then a cron command will \
41+
send_questionnaire = models.BooleanField(verbose_name='Send questionnaires automatically"', default=False,
42+
help_text='If you check this box, questionnaires are sent automatically after nominations')
43+
reminder_interval = models.PositiveIntegerField(help_text='If the nomcom user sets the interval field then a cron command will \
4444
send reminders to the nominees who have not responded using \
4545
the following formula: (today - nomination_date) % interval == 0',
4646
blank=True, null=True)
@@ -142,7 +142,7 @@ class Position(models.Model):
142142
description = models.TextField(verbose_name='Description')
143143
requirement = models.ForeignKey(DBTemplate, related_name='requirement', null=True, editable=False)
144144
questionnaire = models.ForeignKey(DBTemplate, related_name='questionnaire', null=True, editable=False)
145-
is_open = models.BooleanField(verbose_name='Is open')
145+
is_open = models.BooleanField(verbose_name='Is open', default=False)
146146
incumbent = models.ForeignKey(Email, null=True, blank=True)
147147

148148
objects = PositionManager()

0 commit comments

Comments
 (0)