- TRA-99 Solved. Unable to create a new Tenant Make

- Generic improvement of initialisation of Dynamic Forms, ensuring correct form processing
This commit is contained in:
Josako
2025-11-26 11:31:25 +01:00
parent 0d3c3949de
commit f10bb6f395
4 changed files with 40 additions and 21 deletions

View File

@@ -177,7 +177,7 @@ def validate_make_name(form, field):
raise ValidationError(f'A Make with name "{field.data}" already exists. Choose another name.')
class TenantMakeForm(DynamicFormBase):
class TenantMakeForm(FlaskForm):
name = StringField('Name', validators=[DataRequired(), Length(max=50), validate_make_name])
description = TextAreaField('Description', validators=[Optional()])
active = BooleanField('Active', validators=[Optional()], default=True)