web/views/editforms.py
branchtls-sprint
changeset 1459 f3d8a9228bd3
parent 1458 3a3ad51a591e
child 1491 742aff97dbf7
equal deleted inserted replaced
1458:3a3ad51a591e 1459:f3d8a9228bd3
   264         called.
   264         called.
   265         """
   265         """
   266         try:
   266         try:
   267             return super(AutomaticEntityForm, cls_or_self).field_by_name(name, role)
   267             return super(AutomaticEntityForm, cls_or_self).field_by_name(name, role)
   268         except FieldNotFound: # XXX should raise more explicit exception
   268         except FieldNotFound: # XXX should raise more explicit exception
   269             if eschema is None or not name in self.schema:
   269             if eschema is None or not name in cls_or_self.schema:
   270                 raise
   270                 raise
   271             rschema = cls_or_self.schema.rschema(name)
   271             rschema = cls_or_self.schema.rschema(name)
   272             fieldcls = cls_or_self.rfields.etype_rtag(eschema, rschema, role)
   272             fieldcls = cls_or_self.rfields.etype_rtag(eschema, rschema, role)
   273             if fieldcls:
   273             if fieldcls:
   274                 return fieldcls(name=name, role=role, eidparam=True)
   274                 return fieldcls(name=name, role=role, eidparam=True)