Return URL to new job created from job template callback.

This commit is contained in:
Chris Church
2014-04-15 15:41:49 -04:00
parent 7eed13cca4
commit 130d1f071f
2 changed files with 6 additions and 2 deletions

View File

@@ -1231,7 +1231,8 @@ class JobTemplateCallback(GenericAPIView):
data = dict(msg='Error starting job!')
return Response(data, status=status.HTTP_400_BAD_REQUEST)
else:
return Response(status=status.HTTP_202_ACCEPTED)
headers = {'Location': job.get_absolute_url()}
return Response(status=status.HTTP_202_ACCEPTED, headers=headers)
class JobTemplateJobsList(SubListCreateAPIView):