changeset 2890:1a930b0f4ec5

fix #449 Traceback after clicking Save button on User Settings Personal Tab
author RogerHaase <haaserd@gmail.com>
date Mon, 02 Feb 2015 12:31:55 -0700
parents de14a74a72fe
children 3481dfe07098 a0101a36a5a5
files MoinMoin/forms.py
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/forms.py	Mon Feb 02 12:30:04 2015 -0700
+++ b/MoinMoin/forms.py	Mon Feb 02 12:31:55 2015 -0700
@@ -121,8 +121,10 @@
     invalid_name_msg = ""
 
     def validate(self, element, state):
-        # Make sure that the other meta is valid before validating the name.
-        # TODO Change/Make sure that the below statement holds good.
+        if state is None:
+            # incoming request is from +usersettings#personal; apps/frontend/views.py will validate changes to user names
+            return True
+        # Make sure that the other meta is valid before validating the name.  TODO: prove the try below is always redundant and remove it.
         try:
             if not element.parent.parent['extra_meta_text'].valid:
                 return False