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

Before Change


                        for line in form_data
                    ])
                else:
                    reader = csv.reader(form_data)
                    Document.objects.bulk_create([
                        Document(text=line[0].strip(), project=project)
                        for line in reader
                    ])

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):
    template_name = "admin/dataset_download.html"
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

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: ANSSI-FR/SecuML
Commit Name: 671bde26dc98619355d0005e56c856c6b885c923
Time: 2019-09-03
Author: anael.beaugnon@ssi.gouv.fr
File Name: secuml/exp/tools/postgresql_specific.py
Class Name:
Method Name: load_idents


Project Name: biocore/scikit-bio
Commit Name: 694f03f655c1a06259989177ca5ab976ce747e7d
Time: 2014-08-11
Author: ebolyen@gmail.com
File Name: skbio/io/_registry.py
Class Name:
Method Name: read