Skip to content

Commit

Permalink
StringField shouldn't blank data during process_formdata.
Browse files Browse the repository at this point in the history
If StringField blanks data during process_formdata it incorrectly
discards the *data* supplied through FromField.process().

Fixes wtforms#291.
  • Loading branch information
nanocell committed Sep 19, 2017
1 parent c1906fb commit 29c6045
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions wtforms/fields/core.py
Expand Up @@ -529,8 +529,6 @@ class StringField(Field):
def process_formdata(self, valuelist):
if valuelist:
self.data = valuelist[0]
else:
self.data = ''

def _value(self):
return text_type(self.data) if self.data is not None else ''
Expand Down

0 comments on commit 29c6045

Please sign in to comment.