Fixed a number of bad Message.content_type settings.

- Legacy-Id: 17339
This commit is contained in:
Henrik Levkowetz 2020-02-26 17:05:53 +00:00
parent bea0c59d6e
commit fa4adeb374
3 changed files with 6 additions and 4 deletions

View file

@ -1,4 +1,4 @@
# Copyright The IETF Trust 2014-2019, All Rights Reserved
# Copyright The IETF Trust 2014-2020, All Rights Reserved
# -*- coding: utf-8 -*-
@ -165,7 +165,8 @@ def message_from_message(message,by=None):
bcc = message.get('bcc',''),
reply_to = message.get('reply_to',''),
body = get_body(message),
time = utc_from_string(message['date'])
time = utc_from_string(message['date']),
content_type = message.get('content_type', 'text/plain'),
)
return msg

View file

@ -502,7 +502,7 @@ class NomcomViewsTest(TestCase):
to="test@example.com",
frm="nomcomchair@example.com",
body="Hello World!",
content_type="",
content_type="text/plain",
)
msg.related_groups.add(nomcom)

View file

@ -1,3 +1,4 @@
# Copyright The IETF Trust 2013-2020, All Rights Reserved
import datetime
import glob
import os
@ -20,7 +21,7 @@ def announcement_from_form(data, **kwargs):
# possible overrides
by = kwargs.get('by',Person.objects.get(name='(System)'))
from_val = kwargs.get('from_val','Datatracker <internet-drafts-reply@ietf.org>')
content_type = kwargs.get('content_type','')
content_type = kwargs.get('content_type','text/plain')
# from the form
subject = data['subject']