05a86908b5d9b1c90b7f605ce42827ace81b7445,app/grandchallenge/cases/views.py,RawImageUploadSessionViewSet,process_images,#RawImageUploadSessionViewSet#Any#Any#,111

Before Change


        messages.add_message(
            request, messages.SUCCESS, "Upload session re activated."
        )
        return Response({"status": "Images are uploaded."})


class RawImageFileViewSet(
    CreateModelMixin, RetrieveModelMixin, ListModelMixin, GenericViewSet

After Change


            .exclude(consumed=True)
            .exists()
        )
        if (
            upload_session.session_state == UploadSessionState.stopped
            and unconsumed_raw_image_files_exist
        ):
            upload_session.process_images()
            messages.add_message(
                request, messages.SUCCESS, "Upload session re activated."
            )
            return Response(status=status.HTTP_200_OK)
        else:
            messages.add_message(
                request,
                messages.ERROR,
                "Upload session can not be re activated.",
            )
            return Response(status=status.HTTP_400_BAD_REQUEST)


class RawImageFileViewSet(
    CreateModelMixin, RetrieveModelMixin, ListModelMixin, GenericViewSet
):
    serializer_class = RawImageFileSerializer
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: comic/grand-challenge.org
Commit Name: 05a86908b5d9b1c90b7f605ce42827ace81b7445
Time: 2020-01-17
Author: haimasree.diag@gmail.com
File Name: app/grandchallenge/cases/views.py
Class Name: RawImageUploadSessionViewSet
Method Name: process_images


Project Name: polyaxon/polyaxon
Commit Name: f4fe87292f4a0f4f728969a7615bbd3be39f6c91
Time: 2019-02-27
Author: mouradmourafiq@gmail.com
File Name: polyaxon/api/experiments/views.py
Class Name: ExperimentLogsView
Method Name: get


Project Name: polyaxon/polyaxon
Commit Name: 2b49d4b3f7ea47dd1e8f870cdf0ad35430b6c579
Time: 2019-02-28
Author: mouradmourafiq@gmail.com
File Name: polyaxon/api/experiments/views.py
Class Name: ExperimentLogsView
Method Name: get