From 573338515ddd8129102c61fca9277cbee96212b3 Mon Sep 17 00:00:00 2001 From: Tsaqif Date: Wed, 20 Sep 2023 22:28:19 +0700 Subject: [PATCH] omiting some fields on customUnit too... Signed-off-by: Tsaqif --- src/libs/actions/Policy.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/actions/Policy.js b/src/libs/actions/Policy.js index fa12d5d84b2f..ce4341fafb76 100644 --- a/src/libs/actions/Policy.js +++ b/src/libs/actions/Policy.js @@ -714,13 +714,14 @@ function updateWorkspaceCustomUnitAndRate(policyID, currentCustomUnit, newCustom }, ]; + const newCustomUnitParam = _.omit(newCustomUnit, ['pendingAction', 'errors']); const newCustomUnitRateParam = _.omit(newCustomUnit.rates, ['pendingAction', 'errors']); API.write( 'UpdateWorkspaceCustomUnitAndRate', { policyID, lastModified, - customUnit: JSON.stringify(newCustomUnit), + customUnit: JSON.stringify(newCustomUnitParam), customUnitRate: JSON.stringify(newCustomUnitRateParam), }, {optimisticData, successData, failureData},