From 64eccc8001d680ce01d1751a811c8828c6b9bdad Mon Sep 17 00:00:00 2001 From: zhuyue Date: Sat, 9 Oct 2021 13:36:37 +0800 Subject: [PATCH] fix: Fix create flavor fix change access type then create flavor Change-Id: I442b95227182253e38168320486c93345f5b0d8c --- .../compute/containers/Flavor/actions/StepCreate/index.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pages/compute/containers/Flavor/actions/StepCreate/index.jsx b/src/pages/compute/containers/Flavor/actions/StepCreate/index.jsx index 8bcc8075..5cbab4c1 100644 --- a/src/pages/compute/containers/Flavor/actions/StepCreate/index.jsx +++ b/src/pages/compute/containers/Flavor/actions/StepCreate/index.jsx @@ -126,7 +126,8 @@ class StepCreate extends StepAction { ram: memoryGb * 1024, disk: 0, }; - body['os-flavor-access:is_public'] = accessType === 'public'; + const isPublic = accessType === 'public' + body['os-flavor-access:is_public'] = isPublic; if (categoryHasEphemeral) { body['OS-FLV-EXT-DATA:ephemeral'] = ephemeral; } @@ -182,7 +183,7 @@ class StepCreate extends StepAction { return this.store.create( body, extraSpecs, - accessControl.selectedRowKeys || [] + !isPublic && (accessControl.selectedRowKeys || []) ); }; }