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
This commit is contained in:
parent
7c2a161a5f
commit
fd2304e446
|
@ -417,7 +417,6 @@ class StatusChangeSubmitTests(TestCase):
|
|||
self.assertEqual(doc.rev,u'00')
|
||||
with open(path) as f:
|
||||
self.assertEqual(f.read(),"Some initial review text\n")
|
||||
f.close()
|
||||
self.assertTrue( "mid-review-00" in doc.latest_event(NewRevisionDocEvent).desc)
|
||||
|
||||
def test_subsequent_submission(self):
|
||||
|
|
|
@ -108,7 +108,7 @@ def send_status_change_eval_email(request,doc):
|
|||
send_mail_preformatted(request,msg,override=override)
|
||||
|
||||
class UploadForm(forms.Form):
|
||||
content = forms.CharField(widget=forms.Textarea, label="Status change text", help_text="Edit the status change text.", required=False)
|
||||
content = forms.CharField(widget=forms.Textarea, label="Status change text", help_text="Edit the status change text.", required=False, strip=False)
|
||||
txt = forms.FileField(label=".txt format", help_text="Or upload a .txt file.", required=False)
|
||||
|
||||
def clean_content(self):
|
||||
|
|
Loading…
Reference in a new issue