From cedb2934b856336ecbd0bce8dc598ec29afce23f 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 0fee9779..49b3db68 100644 --- a/ihatemoney/forms.py +++ b/ihatemoney/forms.py @@ -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"))