equal
deleted
inserted
replaced
135 if eschema is None or not name in cls_or_self.schema: |
135 if eschema is None or not name in cls_or_self.schema: |
136 raise |
136 raise |
137 rschema = cls_or_self.schema.rschema(name) |
137 rschema = cls_or_self.schema.rschema(name) |
138 # XXX use a sample target type. Document this. |
138 # XXX use a sample target type. Document this. |
139 tschemas = rschema.targets(eschema, role) |
139 tschemas = rschema.targets(eschema, role) |
140 fieldcls = cls_or_self.rfields.etype_get(eschema, rschema, role, tschemas[0]) |
140 fieldcls = cls_or_self.rfields.etype_get(eschema, rschema, role, |
141 kwargs = cls_or_self.rfields_kwargs.etype_get(eschema, rschema, role, tschemas[0]) |
141 tschemas[0]) |
|
142 kwargs = cls_or_self.rfields_kwargs.etype_get(eschema, rschema, |
|
143 role, tschemas[0]) |
142 if kwargs is None: |
144 if kwargs is None: |
143 kwargs = {} |
145 kwargs = {} |
144 if fieldcls: |
146 if fieldcls: |
145 if not isinstance(fieldcls, type): |
147 if not isinstance(fieldcls, type): |
146 return fieldcls # already and instance |
148 return fieldcls # already and instance |