Changed NullBoleanField() to BooleanField(null=True), according to the 2.1 upgrade recommendations.

- Legacy-Id: 18051
This commit is contained in:
Henrik Levkowetz 2020-06-24 20:33:57 +00:00
parent 5ea79b87dd
commit dc7581fef4
6 changed files with 68 additions and 4 deletions

View file

@ -0,0 +1,23 @@
# Generated by Django 2.1.15 on 2020-06-24 13:32
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('doc', '0031_set_state_for_charters_of_replaced_groups'),
]
operations = [
migrations.AlterField(
model_name='ballotpositiondocevent',
name='send_email',
field=models.BooleanField(default=None, null=True),
),
migrations.AlterField(
model_name='consensusdocevent',
name='consensus',
field=models.BooleanField(default=None, null=True),
),
]

View file

@ -1073,7 +1073,7 @@ class StateDocEvent(DocEvent):
state = ForeignKey(State, blank=True, null=True)
class ConsensusDocEvent(DocEvent):
consensus = models.NullBooleanField(default=None)
consensus = models.BooleanField(null=True, default=None)
# IESG events
class BallotType(models.Model):
@ -1164,7 +1164,7 @@ class BallotPositionDocEvent(DocEvent):
discuss_time = models.DateTimeField(help_text="Time discuss text was written", blank=True, null=True)
comment = models.TextField(help_text="Optional comment", blank=True)
comment_time = models.DateTimeField(help_text="Time optional comment was written", blank=True, null=True)
send_email = models.NullBooleanField(default=None)
send_email = models.BooleanField(null=True, default=None)
@memoize
def any_email_sent(self):

View file

@ -0,0 +1,23 @@
# Generated by Django 2.1.15 on 2020-06-24 13:32
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('person', '0011_auto_20200608_1212'),
]
operations = [
migrations.AlterField(
model_name='historicalperson',
name='consent',
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'),
),
migrations.AlterField(
model_name='person',
name='consent',
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'),
),
]

View file

@ -48,7 +48,7 @@ class Person(models.Model):
photo = models.ImageField(storage=NoLocationMigrationFileSystemStorage(), upload_to=settings.PHOTOS_DIRNAME, blank=True, default=None)
photo_thumb = models.ImageField(storage=NoLocationMigrationFileSystemStorage(), upload_to=settings.PHOTOS_DIRNAME, blank=True, default=None)
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.")
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)
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)
def __str__(self):
return self.plain_name()

View file

@ -0,0 +1,18 @@
# Generated by Django 2.1.15 on 2020-06-24 13:32
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('submit', '0004_rename_field_document2'),
]
operations = [
migrations.AlterField(
model_name='submissioncheck',
name='passed',
field=models.BooleanField(default=False, null=True),
),
]

View file

@ -78,7 +78,7 @@ class SubmissionCheck(models.Model):
time = models.DateTimeField(default=datetime.datetime.now)
submission = ForeignKey(Submission, related_name='checks')
checker = models.CharField(max_length=256, blank=True)
passed = models.NullBooleanField(default=False)
passed = models.BooleanField(null=True, default=False)
message = models.TextField(null=True, blank=True)
errors = models.IntegerField(null=True, blank=True, default=None)
warnings = models.IntegerField(null=True, blank=True, default=None)