Skip to content

Commit a7baacf

Browse files
committed
Added missing .as_strings() to some gather_address_lists() calls, in order to assign strings rather than lists to Message CharField instances. Fixed a Message content_type setting.
- Legacy-Id: 17337
1 parent cbdf718 commit a7baacf

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

ietf/doc/views_draft.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1272,7 +1272,7 @@ class PublicationForm(forms.Form):
12721272

12731273
m = Message()
12741274
m.frm = request.user.person.formatted_email()
1275-
(m.to, m.cc) = gather_address_lists('pubreq_rfced',doc=doc)
1275+
(m.to, m.cc) = gather_address_lists('pubreq_rfced',doc=doc).as_strings()
12761276
m.by = request.user.person
12771277

12781278
next_state = State.objects.get(used=True, type="draft-stream-%s" % doc.stream.slug, slug="rfc-edit")
@@ -1302,7 +1302,7 @@ class PublicationForm(forms.Form):
13021302
send_mail_message(request, m)
13031303

13041304
# IANA copy
1305-
(m.to, m.cc) = gather_address_lists('pubreq_rfced_iana',doc=doc)
1305+
(m.to, m.cc) = gather_address_lists('pubreq_rfced_iana',doc=doc).as_strings()
13061306
send_mail_message(request, m, extra=extra_automation_headers(doc))
13071307

13081308
e = DocEvent(doc=doc, type="requested_publication", rev=doc.rev, by=request.user.person)

ietf/submit/mail.py

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

44

@@ -111,7 +111,7 @@ def announce_to_lists(request, submission):
111111
pass
112112
m.subject = 'I-D Action: %s-%s.txt' % (submission.name, submission.rev)
113113
m.frm = settings.IDSUBMIT_ANNOUNCE_FROM_EMAIL
114-
(m.to, m.cc) = gather_address_lists('sub_announced',submission=submission)
114+
(m.to, m.cc) = gather_address_lists('sub_announced',submission=submission).as_strings()
115115
if m.cc:
116116
m.reply_to = m.cc
117117
m.body = render_to_string('submit/announce_to_lists.txt',
@@ -133,7 +133,7 @@ def announce_new_wg_00(request, submission):
133133
pass
134134
m.subject = 'I-D Action: %s-%s.txt' % (submission.name, submission.rev)
135135
m.frm = settings.IDSUBMIT_ANNOUNCE_FROM_EMAIL
136-
(m.to, m.cc) = gather_address_lists('sub_new_wg_00',submission=submission)
136+
(m.to, m.cc) = gather_address_lists('sub_new_wg_00',submission=submission).as_strings()
137137
if m.cc:
138138
m.reply_to = m.cc
139139
m.body = render_to_string('submit/announce_to_lists.txt',
@@ -323,7 +323,8 @@ def submit_message_from_message(message,body,by=None):
323323
bcc = message.get('bcc',''),
324324
reply_to = message.get('reply_to',''),
325325
body = body,
326-
time = utc_from_string(message.get('date', ''))
326+
time = utc_from_string(message.get('date', '')),
327+
content_type = message.get('content_type', 'text/plain'),
327328
)
328329
return msg
329330

0 commit comments

Comments
 (0)