Mercurial > kallithea
diff rhodecode/model/validators.py @ 3674:ff2ea58debb5 beta
fixed ldap tests when ldap lib is installed
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Thu, 04 Apr 2013 18:31:15 +0200 |
parents | 802c94bdfc85 |
children | 3563bb7b4b82 7e3d89d9d3a2 |
line wrap: on
line diff
--- a/rhodecode/model/validators.py Thu Apr 04 17:49:03 2013 +0200 +++ b/rhodecode/model/validators.py Thu Apr 04 18:31:15 2013 +0200 @@ -723,13 +723,7 @@ 'this is the name of the attribute that is equivalent ' 'to "username"') } - - def validate_python(self, value, state): - if not value or not isinstance(value, (str, unicode)): - msg = M(self, 'invalid_cn', state) - raise formencode.Invalid(msg, value, state, - error_dict=dict(ldap_attr_login=msg) - ) + messages['empty'] = messages['invalid_cn'] return _validator