mirror of
https://github.com/spiral-project/ihatemoney.git
synced 2025-04-28 17:32:38 +02:00
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:
parent
bd689f931a
commit
cedb2934b8
1 changed files with 0 additions and 1 deletions
|
@ -457,7 +457,6 @@ class MemberForm(FlaskForm):
|
||||||
and Person.query.filter(
|
and Person.query.filter(
|
||||||
Person.name == field.data,
|
Person.name == field.data,
|
||||||
Person.project == self.project,
|
Person.project == self.project,
|
||||||
Person.activated,
|
|
||||||
).all()
|
).all()
|
||||||
): # NOQA
|
): # NOQA
|
||||||
raise ValidationError(_("This project already have this participant"))
|
raise ValidationError(_("This project already have this participant"))
|
||||||
|
|
Loading…
Reference in a new issue