From 0b085104736feaee3ae5d0587eaeff7cac2c5dd5 Mon Sep 17 00:00:00 2001 From: Du Peng Date: Mon, 18 Mar 2024 18:36:10 +0100 Subject: [PATCH] (bug) unable to update a space with a deleted machine --- CHANGELOG.md | 1 + app/frontend/src/javascript/lib/api.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index df078dc9d..cee1a7843 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Next release - improvement: add loader for create/delete availability slot +- Fix a bug: unable to update a space with a deleted machine ## v6.3.16 2024 March 11 diff --git a/app/frontend/src/javascript/lib/api.ts b/app/frontend/src/javascript/lib/api.ts index 76e99d6fc..1de9110df 100644 --- a/app/frontend/src/javascript/lib/api.ts +++ b/app/frontend/src/javascript/lib/api.ts @@ -18,7 +18,7 @@ export default class ApiLib { ...object, ...attachmentAttributes.reduce((a, name) => { return { ...a, [name]: null }; }, {}) } - }, { dateWithTimezone: true }); + }, { dateWithTimezone: true, allowEmptyArrays: true }); attachmentAttributes.forEach((attr) => { data.delete(`${name}[${attr}]`); if (Array.isArray(object[attr])) {