From a0dcb587c5426bf36cf3eee24b520df32b8b60de Mon Sep 17 00:00:00 2001 From: "Jingwei.Zhang" Date: Tue, 13 Jun 2023 10:09:11 +0800 Subject: [PATCH] fix: fix edit fip fix edit fip when the qos policy service is disabled Closes-Bug: #2023608 Change-Id: Ia909771d38477bf726cec25b1ad46b7780b64244 --- .../containers/FloatingIp/actions/Edit.jsx | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/pages/network/containers/FloatingIp/actions/Edit.jsx b/src/pages/network/containers/FloatingIp/actions/Edit.jsx index 452d2059..aa37d004 100644 --- a/src/pages/network/containers/FloatingIp/actions/Edit.jsx +++ b/src/pages/network/containers/FloatingIp/actions/Edit.jsx @@ -70,15 +70,17 @@ export class Edit extends ModalAction { onSubmit = (values) => { const { description, qos_policy_id } = values; - return globalFloatingIpsStore.edit( - { id: this.item.id }, - { - description, - qos_policy_id: qos_policy_id.selectedRowKeys.length + const body = { + description, + }; + if (this.qosEndpoint) { + body.qos_policy_id = qos_policy_id + ? qos_policy_id.selectedRowKeys.length ? qos_policy_id.selectedRowKeys[0] - : null, - } - ); + : null + : null; + } + return globalFloatingIpsStore.edit({ id: this.item.id }, body); }; get formItems() {