Updated checks for validate_name() in MemberForm()

The database allows users to deactivate an account with a non-zero value, and create a new user with the same name, reactivating the previous user will allow two users of the same name. This change assures that new user names can not be the same as deactivated users with associated bills (Users that are not deleted from deactivation).
This commit is contained in:
Zhongqi Ma 2022-12-10 18:46:58 -05:00 committed by Baptiste Jonglez
parent 35013eff22
commit 707ba186f3

View file

@ -414,7 +414,6 @@ class MemberForm(FlaskForm):
and Person.query.filter(
Person.name == field.data,
Person.project == self.project,
Person.activated,
).all()
): # NOQA
raise ValidationError(_("This project already have this participant"))