f8a72a0a60658d462753fe39a2119932358ccca5,app/server/views.py,DataUpload,post,#DataUpload#Any#,58

Before Change


                form_data = TextIOWrapper(
                    request.FILES["file"].file, encoding="utf-8")
                if project.is_type_of(Project.SEQUENCE_LABELING):
                    Document.objects.bulk_create([
                        Document(text=line.strip(), project=project)
                        for line in form_data
                    ])
                else:
                    reader = csv.reader(form_data)
                    Document.objects.bulk_create([

After Change


        except Exception as e:
            logger.exception(e)
            messages.add_message(request, messages.ERROR, "Something went wrong")
            return HttpResponseRedirect(reverse("upload", args=[project.id]))


class DataDownload(SuperUserMixin, LoginRequiredMixin, TemplateView):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: chakki-works/doccano
Commit Name: f8a72a0a60658d462753fe39a2119932358ccca5
Time: 2018-12-26
Author: sergiy.n@attendify.com
File Name: app/server/views.py
Class Name: DataUpload
Method Name: post


Project Name: bokeh/bokeh
Commit Name: 1af1e90fea7019f08507655584ab1a38d0bfe1c4
Time: 2019-05-10
Author: BdON003@gmail.com
File Name: examples/plotting/file/stacked_area.py
Class Name:
Method Name:


Project Name: bokeh/bokeh
Commit Name: ee8dcf2a4be946bdcf2d1d4afe2cb74480003a71
Time: 2016-08-20
Author: github@birdsbits.com
File Name: examples/plotting/file/texas.py
Class Name:
Method Name:


Project Name: comic/grand-challenge.org
Commit Name: 34fb7ae750095c01926f7af255da89ebf741cb61
Time: 2020-11-30
Author: HarmvZ@users.noreply.github.com
File Name: app/grandchallenge/algorithms/tasks.py
Class Name:
Method Name: send_failed_jobs_email