From e9d14343b741ecb0e6a4e5c40a1535199a7413af Mon Sep 17 00:00:00 2001 From: Michael Taylor Date: Tue, 19 Jul 2022 09:14:17 -0400 Subject: [PATCH] fix: allow edit split units --- src/controllers/staging.controller.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/staging.controller.js b/src/controllers/staging.controller.js index 52c87234..fa053075 100644 --- a/src/controllers/staging.controller.js +++ b/src/controllers/staging.controller.js @@ -142,7 +142,7 @@ export const editRecord = async (req, res) => { await assertStagingRecordExists(req.body.uuid); await Staging.update( - { data: JSON.stringify([req.body.data]) }, + { data: JSON.stringify(_.flatten([req.body.data])) }, { where: { uuid: req.body.uuid } }, );