Add new values to to_dict methods

This commit is contained in:
Patrick Jentsch 2019-10-24 13:29:02 +02:00
parent 83f1aa1a6b
commit 810388b78b

View File

@ -274,6 +274,7 @@ class JobInput(db.Model):
def to_dict(self): def to_dict(self):
return {'id': self.id, return {'id': self.id,
'dir': self.dir,
'filename': self.filename, 'filename': self.filename,
'job_id': self.job_id, 'job_id': self.job_id,
'results': [result.to_dict() for result in self.results]} 'results': [result.to_dict() for result in self.results]}
@ -299,8 +300,10 @@ class JobResult(db.Model):
def to_dict(self): def to_dict(self):
return {'id': self.id, return {'id': self.id,
'dir': self.dir,
'filename': self.filename, 'filename': self.filename,
'job_id': self.job_id} 'job_id': self.job_id,
'job_input_id': self.job_input_id}
class Job(db.Model): class Job(db.Model):