1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-19 13:54:25 +01:00

(bug) unable to remove the last training or the last tag to a member

This commit is contained in:
Sylvain 2022-05-31 17:06:39 +02:00
parent e914567cf1
commit 78f7cdcb8c
2 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@
## next deploy
- Updated react-select to 5.3.2
- Fix a bug: unable to remove the last training or the last tag to a member
- Fix a bug: unable to run scripts on systemts with legacy version of docker-compose
- Fix a bug: unable to sign up if admin actived organization's additional fields with required
- Fix a bug: undefined error in new member page

View File

@ -23,7 +23,7 @@ export default class MemberAPI {
}
static async update (user: User): Promise<User> {
const data = serialize({ user });
const data = serialize({ user }, { allowEmptyArrays: true });
if (user.profile_attributes?.user_avatar_attributes?.attachment_files[0]) {
data.set('user[profile_attributes][user_avatar_attributes][attachment]', user.profile_attributes.user_avatar_attributes.attachment_files[0]);
}