fix: fix edit fip

fix edit fip when the qos policy service is disabled

Closes-Bug: #2023608
Change-Id: Ia909771d38477bf726cec25b1ad46b7780b64244
This commit is contained in:
Jingwei.Zhang 2023-06-13 10:09:11 +08:00
parent ee25e44c4e
commit a0dcb587c5

View File

@ -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() {