From 6fba6ef113c8fdd3dca2ae166c16753410ceb40c Mon Sep 17 00:00:00 2001 From: rimu <3310831+rimu@users.noreply.github.com> Date: Wed, 10 Jan 2024 09:00:24 +1300 Subject: [PATCH] fix username validation --- app/auth/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/auth/forms.py b/app/auth/forms.py index be665bcd..7e11f563 100644 --- a/app/auth/forms.py +++ b/app/auth/forms.py @@ -30,7 +30,7 @@ class RegistrationForm(FlaskForm): raise ValidationError(_('An account with this email address already exists.')) def validate_user_name(self, user_name): - user = User.query.filter_by(user_name=user_name.data).first() + user = User.query.filter_by(user_name=user_name.data, ap_id=None).first() if user is not None: if user.deleted: raise ValidationError(_('This username was used in the past and cannot be reused.'))