Skip to content

Commit

Permalink
Updated checks for validate_name() in MemberForm()
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
mzhongqi authored Dec 10, 2022
1 parent 9a8cc16 commit 8b14119
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion ihatemoney/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,6 @@ def validate_name(self, field):
and Person.query.filter(
Person.name == field.data,
Person.project == self.project,
Person.activated,
).all()
): # NOQA
raise ValidationError(_("This project already have this participant"))
Expand Down

0 comments on commit 8b14119

Please sign in to comment.