Skip to content

Commit dc7581f

Browse files
committed
Changed NullBoleanField() to BooleanField(null=True), according to the 2.1 upgrade recommendations.
- Legacy-Id: 18051
1 parent 5ea79b8 commit dc7581f

6 files changed

Lines changed: 68 additions & 4 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Generated by Django 2.1.15 on 2020-06-24 13:32
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('doc', '0031_set_state_for_charters_of_replaced_groups'),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name='ballotpositiondocevent',
15+
name='send_email',
16+
field=models.BooleanField(default=None, null=True),
17+
),
18+
migrations.AlterField(
19+
model_name='consensusdocevent',
20+
name='consensus',
21+
field=models.BooleanField(default=None, null=True),
22+
),
23+
]

ietf/doc/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,7 +1073,7 @@ class StateDocEvent(DocEvent):
10731073
state = ForeignKey(State, blank=True, null=True)
10741074

10751075
class ConsensusDocEvent(DocEvent):
1076-
consensus = models.NullBooleanField(default=None)
1076+
consensus = models.BooleanField(null=True, default=None)
10771077

10781078
# IESG events
10791079
class BallotType(models.Model):
@@ -1164,7 +1164,7 @@ class BallotPositionDocEvent(DocEvent):
11641164
discuss_time = models.DateTimeField(help_text="Time discuss text was written", blank=True, null=True)
11651165
comment = models.TextField(help_text="Optional comment", blank=True)
11661166
comment_time = models.DateTimeField(help_text="Time optional comment was written", blank=True, null=True)
1167-
send_email = models.NullBooleanField(default=None)
1167+
send_email = models.BooleanField(null=True, default=None)
11681168

11691169
@memoize
11701170
def any_email_sent(self):
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Generated by Django 2.1.15 on 2020-06-24 13:32
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('person', '0011_auto_20200608_1212'),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name='historicalperson',
15+
name='consent',
16+
field=models.BooleanField(default=None, null=True, verbose_name='I hereby give my consent to the use of the personal details I have provided (photo, bio, name, email) within the IETF Datatracker'),
17+
),
18+
migrations.AlterField(
19+
model_name='person',
20+
name='consent',
21+
field=models.BooleanField(default=None, null=True, verbose_name='I hereby give my consent to the use of the personal details I have provided (photo, bio, name, email) within the IETF Datatracker'),
22+
),
23+
]

ietf/person/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ class Person(models.Model):
4848
photo = models.ImageField(storage=NoLocationMigrationFileSystemStorage(), upload_to=settings.PHOTOS_DIRNAME, blank=True, default=None)
4949
photo_thumb = models.ImageField(storage=NoLocationMigrationFileSystemStorage(), upload_to=settings.PHOTOS_DIRNAME, blank=True, default=None)
5050
name_from_draft = models.CharField("Full Name (from submission)", null=True, max_length=255, editable=False, help_text="Name as found in a draft submission.")
51-
consent = models.NullBooleanField("I hereby give my consent to the use of the personal details I have provided (photo, bio, name, email) within the IETF Datatracker", null=True, default=None)
51+
consent = models.BooleanField("I hereby give my consent to the use of the personal details I have provided (photo, bio, name, email) within the IETF Datatracker", null=True, default=None)
5252

5353
def __str__(self):
5454
return self.plain_name()
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 2.1.15 on 2020-06-24 13:32
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('submit', '0004_rename_field_document2'),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name='submissioncheck',
15+
name='passed',
16+
field=models.BooleanField(default=False, null=True),
17+
),
18+
]

ietf/submit/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class SubmissionCheck(models.Model):
7878
time = models.DateTimeField(default=datetime.datetime.now)
7979
submission = ForeignKey(Submission, related_name='checks')
8080
checker = models.CharField(max_length=256, blank=True)
81-
passed = models.NullBooleanField(default=False)
81+
passed = models.BooleanField(null=True, default=False)
8282
message = models.TextField(null=True, blank=True)
8383
errors = models.IntegerField(null=True, blank=True, default=None)
8484
warnings = models.IntegerField(null=True, blank=True, default=None)

0 commit comments

Comments
 (0)