mirror of
https://github.com/ansible/awx.git
synced 2026-03-07 11:41:08 -03:30
ensure credentials exist before we go looking at them
This commit is contained in:
@@ -1777,7 +1777,7 @@ class JobLaunchSerializer(BaseSerializer):
|
|||||||
|
|
||||||
credential = attrs.get('credential', None) or obj.credential
|
credential = attrs.get('credential', None) or obj.credential
|
||||||
# fill passwords dict with request data passwords
|
# fill passwords dict with request data passwords
|
||||||
if credential.passwords_needed:
|
if credential and credential.passwords_needed:
|
||||||
try:
|
try:
|
||||||
for p in credential.passwords_needed:
|
for p in credential.passwords_needed:
|
||||||
passwords[p] = data[p]
|
passwords[p] = data[p]
|
||||||
|
|||||||
Reference in New Issue
Block a user