I delete initial and final blanks of members that are added

This commit is contained in:
DiegoCaraballo 2019-09-27 17:13:29 -03:00
parent 787334777a
commit aad4dfc9c1

View file

@ -186,7 +186,7 @@ class MemberForm(FlaskForm):
if field.data == form.name.default:
raise ValidationError(_("User name incorrect"))
if (not form.edit and Person.query.filter(
Person.name == field.data,
Person.name == field.data.strip(),
Person.project == form.project,
Person.activated == True).all()): # NOQA
raise ValidationError(_("This project already have this member"))