diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/system_config/forms.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/system_config/forms.py index 58014772..8ff05655 100644 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/system_config/forms.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/admin/system_config/forms.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2013-2020 Wind River Systems, Inc. +# Copyright (c) 2013-2022 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -726,7 +726,7 @@ class UpdateiStoragePools(forms.SelfHandlingForm): STORAGE_VALUES['object_pool_gib'] = \ str(storage_config._object_pool_gib) - for key in data.keys(): + for key in data.copy().keys(): data[key] = str(data[key]) LOG.info("initial send_to_sysinv=%s", send_to_sysinv) diff --git a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/dc_admin/dc_orchestration/forms.py b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/dc_admin/dc_orchestration/forms.py index f17bce1f..70de1f5b 100644 --- a/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/dc_admin/dc_orchestration/forms.py +++ b/starlingx-dashboard/starlingx-dashboard/starlingx_dashboard/dashboards/dc_admin/dc_orchestration/forms.py @@ -222,7 +222,7 @@ class CreateCloudStrategyForm(forms.SelfHandlingForm): def handle(self, request, data): try: # convert keys to use dashes - for k in data.keys(): + for k in data.copy().keys(): if 'subcloud_group' in k or 'cloud_name' in k: continue elif '_' in k: @@ -340,7 +340,7 @@ class CreateCloudPatchConfigForm(forms.SelfHandlingForm): def handle(self, request, data): try: - for k in data.keys(): + for k in data.copy().keys(): if '_' in k: data[k.replace('_', '-')] = data[k] del data[k]