web/views/autoform.py
branchtls-sprint
changeset 1788 d6e6ad70e50a
parent 1782 aa7136519c19
child 1969 f14f8465269d
--- a/web/views/autoform.py	Wed May 13 16:59:50 2009 +0200
+++ b/web/views/autoform.py	Wed May 13 17:00:08 2009 +0200
@@ -141,6 +141,8 @@
             if kwargs is None:
                 kwargs = {}
             if fieldcls:
+                if not isinstance(fieldcls, type):
+                    return fieldcls # already and instance
                 return fieldcls(name=name, role=role, eidparam=True, **kwargs)
             field = guess_field(eschema, rschema, role, eidparam=True, **kwargs)
             if field is None: