308 wdg = widget(cls.vreg, cls, rschema, tschema, 'subject') |
308 wdg = widget(cls.vreg, cls, rschema, tschema, 'subject') |
309 else: |
309 else: |
310 tschema = rschema.subjects(cls.e_schema)[0] |
310 tschema = rschema.subjects(cls.e_schema)[0] |
311 wdg = widget(cls.vreg, tschema, rschema, cls, 'object') |
311 wdg = widget(cls.vreg, tschema, rschema, cls, 'object') |
312 return wdg |
312 return wdg |
|
313 |
313 def relations_by_category(self, categories=None, permission=None): |
314 def relations_by_category(self, categories=None, permission=None): |
314 if categories is not None: |
315 if categories is not None: |
315 if not isinstance(categories, (list, tuple, set, frozenset)): |
316 if not isinstance(categories, (list, tuple, set, frozenset)): |
316 categories = (categories,) |
317 categories = (categories,) |
317 if not isinstance(categories, (set, frozenset)): |
318 if not isinstance(categories, (set, frozenset)): |