forked from Github-Mirrors/canaille
Resolve "Impossible to update my password"
This commit is contained in:
parent
84f6184f0f
commit
9c1253878c
3 changed files with 12 additions and 5 deletions
|
@ -5,6 +5,10 @@ Added
|
|||
^^^^^
|
||||
- ``--version`` option to the CLI. :pr:`209`
|
||||
|
||||
Changed
|
||||
^^^^^^^
|
||||
- fixed a bug on updating user's settings :issue:`206`
|
||||
|
||||
[0.0.57] - 2024-12-31
|
||||
---------------------
|
||||
|
||||
|
|
|
@ -784,7 +784,7 @@ def profile_settings_edit(editor, edited_user):
|
|||
if hasattr(edited_user, k) and k in available_fields
|
||||
}
|
||||
|
||||
data["groups"] = [group.id for group in edited_user.groups]
|
||||
data["groups"] = edited_user.groups
|
||||
|
||||
form = build_profile_form(
|
||||
editor.writable_fields & available_fields,
|
||||
|
|
|
@ -260,10 +260,13 @@ PROFILE_FORM_FIELDS = dict(
|
|||
groups=wtforms.SelectMultipleField(
|
||||
_("Groups"),
|
||||
default=[],
|
||||
choices=lambda: [
|
||||
(group, group.display_name)
|
||||
for group in Backend.instance.query(models.Group)
|
||||
],
|
||||
choices=lambda: sorted(
|
||||
[
|
||||
(group, group.display_name)
|
||||
for group in Backend.instance.query(models.Group)
|
||||
],
|
||||
key=lambda group: group[0].id,
|
||||
),
|
||||
render_kw={"placeholder": _("users, admins …")},
|
||||
coerce=IDToModel("Group"),
|
||||
validators=[non_empty_groups],
|
||||
|
|
Loading…
Reference in a new issue