ensure credentials exist before we go looking at them

This commit is contained in:
Chris Meyers 2015-04-28 15:26:22 -04:00
parent f08d8cb5b9
commit 9e67169cb9

View File

@ -1777,7 +1777,7 @@ class JobLaunchSerializer(BaseSerializer):
credential = attrs.get('credential', None) or obj.credential
# fill passwords dict with request data passwords
if credential.passwords_needed:
if credential and credential.passwords_needed:
try:
for p in credential.passwords_needed:
passwords[p] = data[p]