From 1571044bc3d0928f1b826bcd485d6f6dc72209c5 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Wed, 16 Nov 2011 04:45:03 +0000 Subject: [PATCH] Give telechat agenda items a default type, for easier secretariat use of the admin interface for adding entries. Use an empty title string when no title is available. - Legacy-Id: 3626 --- ietf/iesg/models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ietf/iesg/models.py b/ietf/iesg/models.py index f93fd7f28..bcd1949e9 100644 --- a/ietf/iesg/models.py +++ b/ietf/iesg/models.py @@ -86,7 +86,7 @@ class TelechatAgendaItem(models.Model): TYPE_CHOICES_DICT = dict(TYPE_CHOICES) id = models.AutoField(primary_key=True, db_column='template_id') text = models.TextField(blank=True, db_column='template_text') - type = models.IntegerField(db_column='template_type', choices=TYPE_CHOICES) + type = models.IntegerField(db_column='template_type', choices=TYPE_CHOICES, default=3) title = models.CharField(max_length=255, db_column='template_title') #The following fields are apparently not used #note = models.TextField(null=True,blank=True) @@ -94,7 +94,7 @@ class TelechatAgendaItem(models.Model): #decision = models.TextField(null=True,blank=True) def __unicode__(self): type_name = self.TYPE_CHOICES_DICT.get(self.type, str(self.type)) - return u'%s: %s' % (type_name, self.title) + return u'%s: %s' % (type_name, self.title or "") class Meta: db_table = 'templates'