@@ -406,25 +406,25 @@ class ValidPath(formencode.validators.Fa
def to_python(self, value, state):
if not os.path.isdir(value):
msg = _('This is not a valid path')
raise formencode.Invalid(msg, value, state,
error_dict={'paths_root_path':msg})
return value
def UniqSystemEmail(old_data):
class _UniqSystemEmail(formencode.validators.FancyValidator):
value = value.lower()
if old_data.get('email') != value:
if old_data.get('email').lower() != value:
user = User.get_by_email(value, case_insensitive=True)
if user:
raise formencode.Invalid(
_("This e-mail address is already taken"),
value, state)
return _UniqSystemEmail
class ValidSystemEmail(formencode.validators.FancyValidator):
Status change: