Added job_status to marshmallow

- ensured statues not deleted on test runs
- returns in API call

Merge branch 'add-new-column-to-jobs-for-delayed-sending' into scheduled-delivery-of-jobs

Conflicts:
	app/models.py
This commit is contained in:
Martyn Inglis
2016-08-24 14:35:22 +01:00
5 changed files with 70 additions and 58 deletions

View File

@@ -208,6 +208,8 @@ class JobSchema(BaseSchema):
dump_to="created_by", only=["id", "name"], dump_only=True)
created_by = field_for(models.Job, 'created_by', required=True, load_only=True)
job_status = field_for(models.JobStatus, 'name', required=False)
class Meta:
model = models.Job
exclude = ('notifications',)