Skip to content

Commit fa4adeb

Browse files
committed
Fixed a number of bad Message.content_type settings.
- Legacy-Id: 17339
1 parent bea0c59 commit fa4adeb

3 files changed

Lines changed: 6 additions & 4 deletions

File tree

ietf/ipr/mail.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright The IETF Trust 2014-2019, All Rights Reserved
1+
# Copyright The IETF Trust 2014-2020, All Rights Reserved
22
# -*- coding: utf-8 -*-
33

44

@@ -165,7 +165,8 @@ def message_from_message(message,by=None):
165165
bcc = message.get('bcc',''),
166166
reply_to = message.get('reply_to',''),
167167
body = get_body(message),
168-
time = utc_from_string(message['date'])
168+
time = utc_from_string(message['date']),
169+
content_type = message.get('content_type', 'text/plain'),
169170
)
170171
return msg
171172

ietf/nomcom/tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ def test_announcements_view(self):
502502
to="test@example.com",
503503
frm="nomcomchair@example.com",
504504
body="Hello World!",
505-
content_type="",
505+
content_type="text/plain",
506506
)
507507
msg.related_groups.add(nomcom)
508508

ietf/secr/drafts/email.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# Copyright The IETF Trust 2013-2020, All Rights Reserved
12
import datetime
23
import glob
34
import os
@@ -20,7 +21,7 @@ def announcement_from_form(data, **kwargs):
2021
# possible overrides
2122
by = kwargs.get('by',Person.objects.get(name='(System)'))
2223
from_val = kwargs.get('from_val','Datatracker <internet-drafts-reply@ietf.org>')
23-
content_type = kwargs.get('content_type','')
24+
content_type = kwargs.get('content_type','text/plain')
2425

2526
# from the form
2627
subject = data['subject']

0 commit comments

Comments
 (0)