mirror of
https://github.com/ansible/awx.git
synced 2026-05-20 23:37:39 -02: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
|
from awx.main.models import Credential
|
||||||
|
|
||||||
public_galaxy_credential = Credential.objects.filter(managed=True, name='Ansible Galaxy').first()
|
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)
|
self.galaxy_credentials.add(public_galaxy_credential)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user