More documentation and validation for job relaunching/template launching

This commit is contained in:
Matthew Jones 2014-10-07 17:01:12 -04:00
parent 6e24131070
commit 9c81144533
3 changed files with 8 additions and 0 deletions

View File

@ -0,0 +1,3 @@
Relaunch a job:
Make a POST request to this resource to launch a job. If any passwords or variables are required then they should be passed in via POST data. In order to determine what values are required in order to launch a job based on this job template you may make a GET request to this endpoint.

View File

@ -0,0 +1,3 @@
Launch a Job Template:
Make a POST request to this resource to launch a job. If any passwords or variables are required then they should be passed in via POST data. In order to determine what values are required in order to launch a job based on this job template you may make a GET request to this endpoint.

View File

@ -1468,6 +1468,8 @@ class JobTemplateSurveySpec(GenericAPIView):
return Response(dict(error="'question_description' missing from survey element %s" % str(idx)), status=status.HTTP_400_BAD_REQUEST)
if "variable" not in survey_item:
return Response(dict(error="'variable' missing from survey element %s" % str(idx)), status=status.HTTP_400_BAD_REQUEST)
if "required" not in survey_item:
return Response(dict(error="'required' missing from survey element %s" % str(idx)), status=status.HTTP_400_BAD_REQUEST)
idx += 1
obj.save()
return Response()