Check the service is active before sending the notification to the provider.

This commit is contained in:
Rebecca Law
2017-01-31 13:53:13 +00:00
parent ef0f708da0
commit fde3216f9e
5 changed files with 42 additions and 15 deletions

View File

@@ -112,7 +112,7 @@ def get_jobs_by_service(service_id):
def create_job(service_id):
service = dao_fetch_service_by_id(service_id)
if not service.active:
raise InvalidRequest("Unable to create job to inactive service", 400)
raise InvalidRequest("Create job is not allowed: service is inactive ", 403)
data = request.get_json()