diff MoinMoin/items/__init__.py @ 246:727e03c59dbf

simplify form validation check, fix indentation
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 29 May 2011 23:58:55 +0200
parents 52ca5dc1ab15
children 1a1dab306214
line wrap: on
line diff
--- a/MoinMoin/items/__init__.py	Sun May 29 23:38:24 2011 +0200
+++ b/MoinMoin/items/__init__.py	Sun May 29 23:58:55 2011 +0200
@@ -709,8 +709,7 @@
         elif request.method == 'POST':
             form = ModifyForm.from_flat(request.form.items() + request.files.items())
             TextCha(form).amend_form()
-            valid = form.validate()
-            if valid:
+            if form.validate():
                 try:
                     self.modify() # XXX
                 except AccessDeniedError:
@@ -1175,8 +1174,7 @@
         elif request.method == 'POST':
             form = ModifyForm.from_flat(request.form.items() + request.files.items())
             TextCha(form).amend_form()
-            valid = form.validate()
-            if valid:
+            if form.validate():
                 try:
                     self.modify() # XXX
                 except AccessDeniedError: