- Problem editing user model (Boolean values not set)
This commit is contained in:
@@ -88,13 +88,13 @@ class BaseUserForm(FlaskForm):
|
||||
last_name = StringField('Last Name', validators=[DataRequired(), Length(max=80)])
|
||||
valid_to = DateField('Valid to', id='form-control datepicker', validators=[Optional()])
|
||||
tenant_id = IntegerField('Tenant ID', validators=[NumberRange(min=0)])
|
||||
roles = SelectMultipleField('Roles', coerce=int)
|
||||
selected_role_ids = SelectMultipleField('Roles', coerce=int)
|
||||
is_primary_contact = BooleanField('Primary Contact')
|
||||
is_financial_contact = BooleanField('Financial Contact')
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super(BaseUserForm, self).__init__(*args, **kwargs)
|
||||
self.roles.choices = UserServices.get_assignable_roles()
|
||||
self.selected_role_ids.choices = UserServices.get_assignable_roles()
|
||||
|
||||
|
||||
class CreateUserForm(BaseUserForm):
|
||||
|
||||
Reference in New Issue
Block a user