Ticket #994: issue_994_test_fix.patch

File issue_994_test_fix.patch, 896 bytes (added by Ben Sturmfels, 9 years ago)
  • mediagoblin/edit/forms.py

    From b6a2813c4098d849f985ca03724fdd446242c34f Mon Sep 17 00:00:00 2001
    From: Ben Sturmfels <ben@sturm.com.au>
    Date: Fri, 4 Sep 2015 23:31:53 +1000
    Subject: [PATCH] Fix #994: Also set self.data when no change made to URL.
    
    This partially reverts 2a1082e3
    ---
     mediagoblin/edit/forms.py | 3 ++-
     1 file changed, 2 insertions(+), 1 deletion(-)
    
    diff --git a/mediagoblin/edit/forms.py b/mediagoblin/edit/forms.py
    index f7bb2d3..83e83c3 100644
    a b class WebsiteField(wtforms.StringField):  
    3030        if valuelist:
    3131            data = valuelist[0]
    3232            if not data.startswith((u'http://', u'https://')):
    33                 self.data = u'http://' + data
     33                data = u'http://' + data
     34            self.data = data
    3435        else:
    3536            super(WebsiteField, self).process_formdata(valuelist)
    3637