Adjustment in setting handler to work without initial DB. Discussed in #350

This commit is contained in:
Khanh Ngo
2018-09-03 17:27:09 +07:00
parent c7689e7ce7
commit 26c2b5e169
5 changed files with 75 additions and 27 deletions

View File

@ -282,3 +282,12 @@ def init_saml_auth(req):
settings['organization']['en-US']['url'] = own_url
auth = OneLogin_Saml2_Auth(req, settings)
return auth
def display_setting_state(value):
if value == 1:
return "ON"
elif value == 0:
return "OFF"
else:
return "UNKNOWN"