web/views/forms.py
branchstable
changeset 3340 7dfccf5612ed
parent 3245 7ef021ac8dec
child 3354 663bd041f17d
--- a/web/views/forms.py	Mon Sep 21 12:52:17 2009 +0200
+++ b/web/views/forms.py	Mon Sep 21 12:52:44 2009 +0200
@@ -82,9 +82,10 @@
         for key, val in kwargs.items():
             if key in NAV_FORM_PARAMETERS:
                 self.form_add_hidden(key, val)
-            else:
-                assert hasattr(self.__class__, key) and not key[0] == '_', key
+            elif hasattr(self.__class__, key) and not key[0] == '_':
                 setattr(self, key, val)
+            # skip other parameters, usually given for selection
+            # (else write a custom class to handle them)
         if mainform:
             self.form_add_hidden('__errorurl', self.session_key())
             self.form_add_hidden('__domid', self.domid)