mirror of
https://github.com/ansible/awx.git
synced 2026-02-04 11:08:13 -03:30
Fixed Org mapping behavior with SAML when Ansible Galaxy cred does not exist
- Fixes #10879 - Fixes ansible/tower#5061 Signed-off-by: Hideki Saito <saito@fgrep.org>
This commit is contained in:
@@ -118,7 +118,7 @@ class Organization(CommonModel, NotificationFieldsModel, ResourceMixin, CustomVi
|
||||
from awx.main.models import Credential
|
||||
|
||||
public_galaxy_credential = Credential.objects.filter(managed=True, name='Ansible Galaxy').first()
|
||||
if public_galaxy_credential not in self.galaxy_credentials.all():
|
||||
if public_galaxy_credential is not None and public_galaxy_credential not in self.galaxy_credentials.all():
|
||||
self.galaxy_credentials.add(public_galaxy_credential)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user