Skip to content

Commit fd2304e

Browse files
committed
In Django 1.9, CharField form fields will be whitespace-stripped by default. Added strip=False for the status change review form content. Also removed a superfluous f.close().
- Legacy-Id: 12677
1 parent 7c2a161 commit fd2304e

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

ietf/doc/tests_status_change.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,6 @@ def test_initial_submission(self):
417417
self.assertEqual(doc.rev,u'00')
418418
with open(path) as f:
419419
self.assertEqual(f.read(),"Some initial review text\n")
420-
f.close()
421420
self.assertTrue( "mid-review-00" in doc.latest_event(NewRevisionDocEvent).desc)
422421

423422
def test_subsequent_submission(self):

ietf/doc/views_status_change.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def send_status_change_eval_email(request,doc):
108108
send_mail_preformatted(request,msg,override=override)
109109

110110
class UploadForm(forms.Form):
111-
content = forms.CharField(widget=forms.Textarea, label="Status change text", help_text="Edit the status change text.", required=False)
111+
content = forms.CharField(widget=forms.Textarea, label="Status change text", help_text="Edit the status change text.", required=False, strip=False)
112112
txt = forms.FileField(label=".txt format", help_text="Or upload a .txt file.", required=False)
113113

114114
def clean_content(self):

0 commit comments

Comments
 (0)