

def get_related_types(cls, **kwargs):
    from wq.db.rest.models import ContentType as RestContentType
    ctypes = set()
    for rtype in cls.objects.filter(**kwargs):
        ctype = RestContentType.objects.get_for_id(rtype.right.pk)
        ctypes.add(ctype)
    return ctypes

dataset/ETHPy150Open wq/wq.db/patterns/relate/models.py get_related_types/original