web/formfields.py
branchstable
changeset 6690 7d68948015ba
parent 6582 8eb7883b4223
child 7070 5f8e52d722c5
--- a/web/formfields.py	Fri Nov 05 17:00:41 2010 +0100
+++ b/web/formfields.py	Fri Nov 05 18:48:05 2010 +0100
@@ -428,7 +428,9 @@
                 vocab[i] = option
         return vocab
 
-    def format(self, form):
+    # support field as argument to avoid warning when used as format field value
+    # callback
+    def format(self, form, field=None):
         """return MIME type used for the given (text or bytes) field"""
         if self.eidparam and self.role == 'subject':
             entity = form.edited_entity