mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 11:50:42 -03:30
Fix a bug where, when launching a job without a credential and
subsequently supplying the credential we weren't able to pick up any ASK fields that we needed credentials for
This commit is contained in:
parent
f7706c3808
commit
b1b9fdede5
@ -1483,7 +1483,8 @@ class JobTemplateLaunch(GenericAPIView):
|
||||
new_job = obj.create_unified_job(**request.DATA)
|
||||
result = new_job.signal_start(**request.DATA)
|
||||
if not result:
|
||||
data = dict(passwords_needed_to_start=obj.passwords_needed_to_start)
|
||||
data = dict(passwords_needed_to_start=new_job.passwords_needed_to_start)
|
||||
# TODO, this scenario leaves an orphaned "new" job. Should we delete it?
|
||||
return Response(data, status=status.HTTP_400_BAD_REQUEST)
|
||||
else:
|
||||
data = dict(job=new_job.id)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user