Fixed all the warnings emitted by the check command; mostly use of null=True on ManyToManyFields, which doesn't make sense.

- Legacy-Id: 12256
This commit is contained in:
Henrik Levkowetz 2016-11-03 20:13:44 +00:00
parent cfe4d2f6aa
commit 87e1339924
6 changed files with 9 additions and 9 deletions

View file

@ -53,7 +53,7 @@ class DocumentInfo(models.Model):
title = models.CharField(max_length=255)
states = models.ManyToManyField(State, blank=True) # plain state (Active/Expired/...), IESG state, stream state
tags = models.ManyToManyField(DocTagName, blank=True, null=True) # Revised ID Needed, ExternalParty, AD Followup, ...
tags = models.ManyToManyField(DocTagName, blank=True) # Revised ID Needed, ExternalParty, AD Followup, ...
stream = models.ForeignKey(StreamName, blank=True, null=True) # IETF, IAB, IRTF, Independent Submission
group = models.ForeignKey(Group, blank=True, null=True) # WG, RG, IAB, IESG, Edu, Tools

View file

@ -40,7 +40,7 @@ class LiaisonStatement(models.Model):
other_identifiers = models.TextField(blank=True, null=True) # Identifiers from other bodies
body = models.TextField(blank=True)
tags = models.ManyToManyField(LiaisonStatementTagName, blank=True, null=True)
tags = models.ManyToManyField(LiaisonStatementTagName, blank=True)
attachments = models.ManyToManyField(Document, through='LiaisonStatementAttachment', blank=True)
state = models.ForeignKey(LiaisonStatementState, default='pending')
@ -212,7 +212,7 @@ class RelatedLiaisonStatement(models.Model):
class LiaisonStatementGroupContacts(models.Model):
group = models.ForeignKey(Group, unique=True)
group = models.OneToOneField(Group)
contacts = models.CharField(max_length=255,blank=True)
cc_contacts = models.CharField(max_length=255,blank=True)

View file

@ -22,8 +22,8 @@ def clean_duplicates(addrlist):
class MailTrigger(models.Model):
slug = models.CharField(max_length=32, primary_key=True)
desc = models.TextField(blank=True)
to = models.ManyToManyField('Recipient', null=True, blank=True, related_name='used_in_to')
cc = models.ManyToManyField('Recipient', null=True, blank=True, related_name='used_in_cc')
to = models.ManyToManyField('Recipient', blank=True, related_name='used_in_to')
cc = models.ManyToManyField('Recipient', blank=True, related_name='used_in_cc')
class Meta:
ordering = ["slug"]

View file

@ -416,7 +416,7 @@ class TimeSlot(models.Model):
duration = TimedeltaField()
location = models.ForeignKey(Room, blank=True, null=True)
show_location = models.BooleanField(default=True, help_text="Show location in agenda.")
sessions = models.ManyToManyField('Session', related_name='slots', through='SchedTimeSessAssignment', null=True, blank=True, help_text=u"Scheduled session, if any.")
sessions = models.ManyToManyField('Session', related_name='slots', through='SchedTimeSessAssignment', blank=True, help_text=u"Scheduled session, if any.")
modified = models.DateTimeField(auto_now=True)
#

View file

@ -205,8 +205,8 @@ class Position(models.Model):
class Feedback(models.Model):
nomcom = models.ForeignKey('NomCom')
author = models.EmailField(verbose_name='Author', blank=True)
positions = models.ManyToManyField('Position', blank=True, null=True)
nominees = models.ManyToManyField('Nominee', blank=True, null=True)
positions = models.ManyToManyField('Position', blank=True)
nominees = models.ManyToManyField('Nominee', blank=True)
subject = models.TextField(verbose_name='Subject', blank=True)
comments = EncryptedTextField(verbose_name='Comments')
type = models.ForeignKey(FeedbackTypeName, blank=True, null=True)

View file

@ -77,7 +77,7 @@ class Submission(models.Model):
return Document.objects.filter(name=self.name).first()
class SubmissionCheck(models.Model):
time = models.DateTimeField(auto_now=True, default=None) # The default is to make makemigrations happy
time = models.DateTimeField(auto_now=True)
submission = models.ForeignKey(Submission, related_name='checks')
checker = models.CharField(max_length=256, blank=True)
passed = models.NullBooleanField(default=False)