7ab84f1ba00a59a0721a1c564d72aa1200894bd0,polyaxon/db/models/jobs.py,Job,save,#Job#,70

Before Change


        return self.unique_name

    def save(self, *args, **kwargs):  // pylint:disable=arguments-differ
        if self.pk is None:
            last = Job.objects.filter(project=self.project).last()
            self.sequence = 1
            if last:
                self.sequence = last.sequence + 1

        super(Job, self).save(*args, **kwargs)

    @property
    def unique_name(self):

After Change


        return self.unique_name

    def save(self, *args, **kwargs):  // pylint:disable=arguments-differ
        filter_query = Job.sequence_objects.filter(project=self.project)
        self._set_sequence(filter_query=filter_query)
        self._set_name(unique_name=self.unique_name)
        super(Job, self).save(*args, **kwargs)

    @property
    def unique_name(self):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 18

Instances


Project Name: polyaxon/polyaxon
Commit Name: 7ab84f1ba00a59a0721a1c564d72aa1200894bd0
Time: 2018-06-14
Author: mouradmourafiq@gmail.com
File Name: polyaxon/db/models/jobs.py
Class Name: Job
Method Name: save


Project Name: polyaxon/polyaxon
Commit Name: 7ab84f1ba00a59a0721a1c564d72aa1200894bd0
Time: 2018-06-14
Author: mouradmourafiq@gmail.com
File Name: polyaxon/db/models/experiments.py
Class Name: Experiment
Method Name: save


Project Name: polyaxon/polyaxon
Commit Name: 7ab84f1ba00a59a0721a1c564d72aa1200894bd0
Time: 2018-06-14
Author: mouradmourafiq@gmail.com
File Name: polyaxon/db/models/experiment_groups.py
Class Name: ExperimentGroup
Method Name: save


Project Name: polyaxon/polyaxon
Commit Name: 7ab84f1ba00a59a0721a1c564d72aa1200894bd0
Time: 2018-06-14
Author: mouradmourafiq@gmail.com
File Name: polyaxon/db/models/build_jobs.py
Class Name: BuildJob
Method Name: save