diff --git a/tailbone/views/users.py b/tailbone/views/users.py index 69f5e4cd..562ec8e3 100644 --- a/tailbone/views/users.py +++ b/tailbone/views/users.py @@ -169,10 +169,10 @@ class UserCrud(CrudView): ]) if self.creating: - def valid_username(value, field): + def unique_username(value, field): if Session.query(User).filter_by(username=value).count(): raise ValidationError("Username must be unique.") - fs.username.set(validate=valid_username) + fs.username.set(validate=unique_username) if self.readonly: del fs.password