# HG changeset patch # User Marcin Kuzminski # Date 2013-06-11 12:28:05 # Node ID 7e9494f4c4bfcf84878882a24384dda15f5354de # Parent 3cb5a35a319deefc7d74813ebbf62b88ed29797b fixed issue with ldap disabling after initially enabling it diff --git a/rhodecode/controllers/admin/ldap_settings.py b/rhodecode/controllers/admin/ldap_settings.py --- a/rhodecode/controllers/admin/ldap_settings.py +++ b/rhodecode/controllers/admin/ldap_settings.py @@ -115,7 +115,7 @@ class LdapSettingsController(BaseControl for k, v in form_result.items(): if k.startswith('ldap_'): if k == 'ldap_active': - v = ldap_active + v = v if ldap_active else False setting = RhodeCodeSetting.get_by_name(k) setting.app_settings_value = v Session().add(setting) @@ -125,8 +125,8 @@ class LdapSettingsController(BaseControl category='success') if not ldap_active: #if ldap is missing send an info to user - h.flash(_('Unable to activate ldap. The "python-ldap" library ' - 'is missing.'), category='warning') + h.flash(_('Unable to activate ldap. The "python-ldap" ' + 'library is missing.'), category='warning') except (DatabaseError,): raise