diff --git a/pkg/webui/console/views/gateway-general-settings/index.js b/pkg/webui/console/views/gateway-general-settings/index.js index 1d256092a9..47e5426945 100644 --- a/pkg/webui/console/views/gateway-general-settings/index.js +++ b/pkg/webui/console/views/gateway-general-settings/index.js @@ -77,14 +77,21 @@ const GatewayGeneralSettingsInner = () => { const handleSubmit = useCallback( async values => { const formValues = { ...values } - const { attributes } = formValues + const { attributes, frequency_plan_ids } = formValues if (isEqual(gateway.attributes || {}, attributes)) { delete formValues.attributes } - const changed = diff(gateway, formValues) - const update = 'attributes' in changed ? { ...changed, attributes } : changed + if (isEqual(gateway.frequency_plan_ids || {}, frequency_plan_ids)) { + delete formValues.frequency_plan_ids + } + + const changed = diff(gateway, formValues, { + patchArraysItems: false, + patchInFull: ['attributes', 'frequency_plan_ids'], + }) + try { - await dispatch(updateGateway(gtwId, update)) + await dispatch(updateGateway(gtwId, changed)) toast({ title: gtwId, message: m.updateSuccess,