diff --git a/awx/main/tasks.py b/awx/main/tasks.py index adf60f9516..ddb0d509e3 100644 --- a/awx/main/tasks.py +++ b/awx/main/tasks.py @@ -768,7 +768,9 @@ class RunProjectUpdate(BaseTask): ''' private_data = {} if project_update.credential: - private_data['scm_credential'] = decrypt_field(project_update.credential, 'ssh_key_data') or None + credential = project_update.credential + if credential.ssh_key_data not in (None, ''): + private_data['scm_credential'] = decrypt_field(project_update.credential, 'ssh_key_data') return private_data def build_passwords(self, project_update, **kwargs):