web/form.py
changeset 4165 eb9acad29407
parent 4082 c7117119e215
child 4224 5998df006968
--- a/web/form.py	Mon Dec 21 20:21:56 2009 +0100
+++ b/web/form.py	Mon Dec 21 20:23:56 2009 +0100
@@ -101,7 +101,7 @@
         return fields
 
     @iclassmethod
-    def field_by_name(cls_or_self, name, role='subject'):
+    def field_by_name(cls_or_self, name, role=None):
         """return field with the given name and role.
         Raise FieldNotFound if the field can't be found.
         """
@@ -111,7 +111,7 @@
         raise FieldNotFound(name)
 
     @iclassmethod
-    def fields_by_name(cls_or_self, name, role='subject'):
+    def fields_by_name(cls_or_self, name, role=None):
         """return a list of fields with the given name and role"""
         return [field for field in cls_or_self._fieldsattr()
                 if field.name == name and field.role == role]