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 Alexis Métaireau
parent bd689f931a
commit cedb2934b8
No known key found for this signature in database
GPG key ID: 1C21B876828E5FF2

View file

@ -457,7 +457,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"))