Commits

Oleg Lebedev committed 672166a

one more fix

Comments (0)

Files changed (1)

flaskext/wtf/__init__.py

         return request and request.method in ("PUT", "POST")
 
     def process(self, formdata=None, obj=None, **kwargs):
-
+	    
+        formdata = formdata or request.form
+        filedata = request.files or formdata
+        
         if self.is_submitted():
 
-            formdata = formdata or request.form
-            filedata = request.files or formdata
-
             # ensure csrf validation occurs ONLY when formdata is passed
             # in case "csrf" is the only field in the form
 
                 self.csrf_is_valid = False
             else:
                 self.csrf_is_valid = None
+
         for name, field, in self._fields.iteritems():
             if isinstance(field, FileField):
                 data = filedata