entities/__init__.py
branchtls-sprint
changeset 1149 1e19b6ef53a1
parent 1134 f885df228fc0
child 1150 2d1b721fded9
equal deleted inserted replaced
1148:55a8238f8f7c 1149:1e19b6ef53a1
   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)):