From 707ba186f35bcd46160ecefc3f43cba7c27ac7b3 Mon Sep 17 00:00:00 2001 From: Zhongqi Ma <59981957+mzhongqi@users.noreply.github.com> Date: Sat, 10 Dec 2022 18:46:58 -0500 Subject: [PATCH] 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). --- ihatemoney/forms.py | 1 - 1 file changed, 1 deletion(-) diff --git a/ihatemoney/forms.py b/ihatemoney/forms.py index e9973fdd..c9ab7db8 100644 --- a/ihatemoney/forms.py +++ b/ihatemoney/forms.py @@ -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"))