Skip to content

Commit

Permalink
omiting some fields on customUnit too...
Browse files Browse the repository at this point in the history
Signed-off-by: Tsaqif <[email protected]>
  • Loading branch information
tsa321 committed Sep 20, 2023
1 parent fbe8b0d commit 5733385
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libs/actions/Policy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down

0 comments on commit 5733385

Please sign in to comment.