1a61ba3655e575cbf4d20190182654cb677bce9c,app/grandchallenge/serving/tasks.py,,create_download,#,8

Before Change


        d.count = F("count") + 1
        d.save()
    except Download.DoesNotExist:
        Download.objects.create(**kwargs)

After Change



@shared_task
def create_download(*_, **kwargs):
    d, created = Download.objects.get_or_create(**kwargs)

    if not created:
        d.count = F("count") + 1
        d.save()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: comic/grand-challenge.org
Commit Name: 1a61ba3655e575cbf4d20190182654cb677bce9c
Time: 2020-06-05
Author: 12661555+jmsmkn@users.noreply.github.com
File Name: app/grandchallenge/serving/tasks.py
Class Name:
Method Name: create_download


Project Name: polyaxon/polyaxon
Commit Name: 5f9c557c99783cbe5d3b21be9ecd95b2e17f8092
Time: 2019-07-10
Author: mouradmourafiq@gmail.com
File Name: polyaxon/db/models/clusters.py
Class Name: Cluster
Method Name: create_cluster_owner


Project Name: comic/grand-challenge.org
Commit Name: 1fd21ffb0674666d6919871f17899c6fb79817a2
Time: 2018-09-08
Author: jamesmeakin@gmail.com
File Name: app/grandchallenge/algorithms/models.py
Class Name: Job
Method Name: create_result


Project Name: polyaxon/polyaxon
Commit Name: 34ee8c68cdb0659613160b285817ae27dfe58271
Time: 2018-07-17
Author: mouradmourafiq@gmail.com
File Name: polyaxon/api/bookmarks/views.py
Class Name: BookmarkCreateView
Method Name: create