From 5f561001eba683d2d6658c94727c65cf61802254 Mon Sep 17 00:00:00 2001 From: Martyn Inglis Date: Mon, 5 Sep 2016 13:39:03 +0100 Subject: [PATCH] Merged code from master / fixed conflicts --- app/notify_client/job_api_client.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/notify_client/job_api_client.py b/app/notify_client/job_api_client.py index 046ab4b9d..ea545b508 100644 --- a/app/notify_client/job_api_client.py +++ b/app/notify_client/job_api_client.py @@ -49,13 +49,17 @@ class JobApiClient(BaseAPIClient): return self.get(url='/service/{}/job'.format(service_id), params=params) - def create_job(self, job_id, service_id, template_id, original_file_name, notification_count): + def create_job(self, job_id, service_id, template_id, original_file_name, notification_count, scheduled_for=None): data = { "id": job_id, "template": template_id, "original_file_name": original_file_name, "notification_count": notification_count } + + if scheduled_for: + data.update({'scheduled_for': scheduled_for}) + data = _attach_current_user(data) job = self.post(url='/service/{}/job'.format(service_id), data=data)