diff --git a/ietf/doc/models.py b/ietf/doc/models.py index 33f2ffef0..c0ba3e4d8 100644 --- a/ietf/doc/models.py +++ b/ietf/doc/models.py @@ -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 diff --git a/ietf/doc/templatetags/ietf_filters.py b/ietf/doc/templatetags/ietf_filters.py index db88b4d3c..50ffb8a08 100644 --- a/ietf/doc/templatetags/ietf_filters.py +++ b/ietf/doc/templatetags/ietf_filters.py @@ -13,7 +13,7 @@ from ietf.doc.models import ConsensusDocEvent from ietf.doc.utils import get_document_content from django import template from django.conf import settings -from django.utils.html import escape, fix_ampersands +from django.utils.html import escape from django.template.defaultfilters import truncatewords_html, linebreaksbr, stringfilter, striptags, urlize from django.template import resolve_variable from django.utils.safestring import mark_safe, SafeData @@ -69,7 +69,7 @@ def parse_email_list(value): (name, email) = parseaddr(addr) if not(name): name = email - ret.append('%s' % ( fix_ampersands(email), escape(name) )) + ret.append('%s' % ( email.replace('&', '&'), escape(name) )) return mark_safe(", ".join(ret)) else: return value diff --git a/ietf/liaisons/models.py b/ietf/liaisons/models.py index 9abfe83f0..df9357423 100644 --- a/ietf/liaisons/models.py +++ b/ietf/liaisons/models.py @@ -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) diff --git a/ietf/mailtrigger/models.py b/ietf/mailtrigger/models.py index 20343c148..526b5f5dd 100644 --- a/ietf/mailtrigger/models.py +++ b/ietf/mailtrigger/models.py @@ -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"] diff --git a/ietf/meeting/models.py b/ietf/meeting/models.py index 6df3235ab..3f000f803 100644 --- a/ietf/meeting/models.py +++ b/ietf/meeting/models.py @@ -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) # diff --git a/ietf/nomcom/models.py b/ietf/nomcom/models.py index 8e1afc691..724f0662b 100644 --- a/ietf/nomcom/models.py +++ b/ietf/nomcom/models.py @@ -1,4 +1,4 @@ -# -*- coding: utf-8 -*- +# -*- coding: utf-8 -*- import os from django.db import models @@ -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) diff --git a/ietf/submit/models.py b/ietf/submit/models.py index 9bb3fed18..6e710cc6b 100644 --- a/ietf/submit/models.py +++ b/ietf/submit/models.py @@ -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)