From 810388b78b21b8de109a60844ef87901cc138253 Mon Sep 17 00:00:00 2001
From: Patrick Jentsch
Date: Thu, 24 Oct 2019 13:29:02 +0200
Subject: [PATCH] Add new values to to_dict methods
---
app/models.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/app/models.py b/app/models.py
index 2c993f21..fbff582d 100644
--- a/app/models.py
+++ b/app/models.py
@@ -274,6 +274,7 @@ class JobInput(db.Model):
def to_dict(self):
return {'id': self.id,
+ 'dir': self.dir,
'filename': self.filename,
'job_id': self.job_id,
'results': [result.to_dict() for result in self.results]}
@@ -299,8 +300,10 @@ class JobResult(db.Model):
def to_dict(self):
return {'id': self.id,
+ 'dir': self.dir,
'filename': self.filename,
- 'job_id': self.job_id}
+ 'job_id': self.job_id,
+ 'job_input_id': self.job_input_id}
class Job(db.Model):