Fixed configjs so disabled custom auths works in all cases

This commit is contained in:
Adolfo Gómez García 2021-08-25 12:48:54 +02:00
parent d38347c534
commit 24687fda2e

View File

@ -98,7 +98,7 @@ def udsJs(request: 'HttpRequest') -> str:
if tag and authenticators: # Refilter authenticators, visible and with this tag if required if tag and authenticators: # Refilter authenticators, visible and with this tag if required
authenticators = [x for x in authenticators if x.small_name == tag or (tag == 'disabled' and x.getType().isCustom() is False)] authenticators = [x for x in authenticators if x.small_name == tag or (tag == 'disabled' and x.getType().isCustom() is False)]
if not authenticators: if not authenticators and tag != 'disabled':
try: try:
authenticators = [Authenticator.objects.order_by('priority')[0]] authenticators = [Authenticator.objects.order_by('priority')[0]]
except Exception: # There is no authenticators yet... except Exception: # There is no authenticators yet...