mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-30 12:26:25 -06:00
Do not fail silently when ldap_config yields an ImportError itself
This commit is contained in:
parent
cd236aa886
commit
7494e2999b
@ -382,8 +382,11 @@ CSRF_TRUSTED_ORIGINS = ALLOWED_HOSTS
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
from netbox import ldap_config as LDAP_CONFIG
|
from netbox import ldap_config as LDAP_CONFIG
|
||||||
except ImportError:
|
except ImportError as ie:
|
||||||
LDAP_CONFIG = None
|
if ie.name == 'netbox':
|
||||||
|
LDAP_CONFIG = None
|
||||||
|
else:
|
||||||
|
raise ie
|
||||||
|
|
||||||
if LDAP_CONFIG is not None:
|
if LDAP_CONFIG is not None:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user