adb852f0e78dfbc8664417a6cd314821fefab917,doccano/app/server/views.py,AnnotationAPIView,get,#AnnotationAPIView#Any#,18

Before Change


        annotation_list = Annotation.objects.all()
        paginator = Paginator(annotation_list, 5)

        page = request.GET.get("page")
        annotations = paginator.get_page(page)
        annotations = [a.as_dict() for a in annotations]

        return JsonResponse({"annotations": annotations})

After Change


            // Left outer join data and annotation.
            // Filter manual=False
            // Sort prob
            docs = Annotation.objects.all()
        else:
            // Left outer join data and annotation.
            docs = RawData.objects.filter(annotation__isnull=True)
            docs = [{**d.as_dict(), **{"labels": []}} for d in docs]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: chakki-works/doccano
Commit Name: adb852f0e78dfbc8664417a6cd314821fefab917
Time: 2018-05-15
Author: light.tree.1.13@gmail.com
File Name: doccano/app/server/views.py
Class Name: AnnotationAPIView
Method Name: get


Project Name: comic/grand-challenge.org
Commit Name: e8bafba0d6a342e0a6de13f4ca05b71a111f22e1
Time: 2018-10-18
Author: jamesmeakin@gmail.com
File Name: app/grandchallenge/core/views.py
Class Name:
Method Name: comicmain


Project Name: comic/grand-challenge.org
Commit Name: 4f8a3739ec24cd07cad430bc5bfaaf095c6b3582
Time: 2020-01-17
Author: code@jmsmkn.com
File Name: app/tests/cases_tests/test_forms.py
Class Name:
Method Name: test_upload_some_images