BaseModel __unicode__ method now returns str(pk) if the 'name' attribute does not exist
This commit is contained in:
parent
7c964758e9
commit
e6a57d4c92
|
@ -422,12 +422,18 @@ class PipelineRun(models.Model):
|
|||
start_time = models.DateTimeField()
|
||||
end_time = models.DateTimeField(null=True)
|
||||
|
||||
def __unicode__(self):
|
||||
return str(self.pk)
|
||||
|
||||
def __str__(self):
|
||||
return self.__unicode__()
|
||||
|
||||
class Meta: # pylint: disable=old-style-class,no-init
|
||||
ordering = ["-id"]
|
||||
|
||||
|
||||
class PipelineData(models.Model):
|
||||
pipeline_run = models.ForeignKey(PipelineRun)
|
||||
pipeline_run = models.ForeignKey(PipelineRun, verbose_name='group')
|
||||
task_type = models.IntegerField(choices=PipelineTaskType.choices())
|
||||
workload = models.ForeignKey(Workload)
|
||||
data = models.TextField()
|
||||
|
|
Loading…
Reference in New Issue