3113d9576442ea742cb9c7eb74f61c51c29fafa3,app/grandchallenge/cases/views.py,CaseCreate,form_valid,#CaseCreate#Any#,18

Before Change


        with uploaded_file.open() as f:
            form.instance.file.save(uploaded_file.name, File(f))

        return super().form_valid(form)


class CaseDetail(DetailView):
    model = Case

After Change



    def form_valid(self, form):
        form.instance.creator = self.request.user
        redirect = super().form_valid(form)

        for uploaded_file in form.cleaned_data["chunked_upload"]:
            with uploaded_file.open() as f:
                case_file = CaseFile.objects.create(
                    case=self.object,
                )
                case_file.file.save(uploaded_file.name, File(f))

        return redirect


class CaseDetail(DetailView):
    model = Case
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 5

Instances


Project Name: comic/grand-challenge.org
Commit Name: 3113d9576442ea742cb9c7eb74f61c51c29fafa3
Time: 2018-05-31
Author: jamesmeakin@gmail.com
File Name: app/grandchallenge/cases/views.py
Class Name: CaseCreate
Method Name: form_valid


Project Name: comic/grand-challenge.org
Commit Name: 0e503943ac7007b465283bbf3ef49b691d2c7fb7
Time: 2018-03-04
Author: jamesmeakin@gmail.com
File Name: app/pages/views.py
Class Name: PageUpdate
Method Name: form_valid


Project Name: comic/grand-challenge.org
Commit Name: 81bd14e7c65d3137341e1eb6a0cffe2312a68036
Time: 2019-07-24
Author: code@jmsmkn.com
File Name: app/grandchallenge/reader_studies/views.py
Class Name: ReaderStudyCreate
Method Name: form_valid


Project Name: comic/grand-challenge.org
Commit Name: 7368a131eca8bcd11468fdafe2937f5bf7b1d8fb
Time: 2018-03-07
Author: jamesmeakin@gmail.com
File Name: app/participants/views.py
Class Name: RegistrationRequestCreate
Method Name: form_valid