def getRoles(self, user: User = None, uid=None): from .views import ProjectView if user is not None: uid = user.id part = ProjectView.Common.getParticipation(uid, self.id) return ModelUtils.getObjectRelatedForAll(part.participationrole_set, 'role', True)
def members(self): return ModelUtils.getObjectRelatedForAll(self.participation_set, 'user')