def get(self, request):
    sponsor_has_open_role = set(OpenRole.objects.values_list('sponsor', flat=True))
    sponsor_set = Sponsor.objects.filter(id__in=sponsor_has_open_role).order_by('level')
    open_roles = OpenRole.objects.filter(sponsor__in=sponsor_has_open_role).order_by('sponsor__level')
    response_data = {'data': []}
    for sponsor in sponsor_set:
        jobs = []
        for open_role in open_roles:
            jobs.append({'job_url': open_role.url, 'job_name': open_role.name, 'job_description_en_us': open_role.description_en_us, 'job_description_zh_hant': open_role.description_zh_hant})
        response_data['data'].append({'sponsor_logo_url': (sponsor.logo.url if sponsor.logo else ''), 'sponsor_name': sponsor.name, 'jobs': jobs})
    return Response(response_data)
def get(self, request):
    sponsor_has_open_role = set(OpenRole.objects.values_list('sponsor', flat=True))
    sponsor_set = Sponsor.objects.filter(id__in=sponsor_has_open_role).order_by('level')
    open_roles = OpenRole.objects.filter(sponsor__in=sponsor_has_open_role).order_by('sponsor__level')
    response_data = {'data': []}
    for sponsor in sponsor_set:
        jobs = []
        for open_role in open_roles:
            jobs.append({'job_url': open_role.url, 'job_name': open_role.name, 'job_description_en_us': open_role.description_en_us, 'job_description_zh_hant': open_role.description_zh_hant})
        response_data['data'].append({'sponsor_logo_url': (sponsor.logo.url if sponsor.logo else ), 'sponsor_name': sponsor.name, 'jobs': jobs})
    return Response(response_data)