diff options
author | 2018-03-14 11:25:06 +0100 | |
---|---|---|
committer | 2018-03-15 10:47:03 +0100 | |
commit | d425d4edf13ed389cd34113bd9fd78eaa0a08c20 (patch) | |
tree | 1ecfdf8a7f97f71748cf31e0ef45518997672993 /moon_manager/moon_manager/api/json_export.py | |
parent | acb811aafc97d60cdcc71e0b9b2466fb00bfb097 (diff) |
Fix bugs due to the modification of python_moondb
Change-Id: Id3855a6e8da9f8ef942c7a34a3e8da4f87be4c9e
Diffstat (limited to 'moon_manager/moon_manager/api/json_export.py')
-rw-r--r-- | moon_manager/moon_manager/api/json_export.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/moon_manager/moon_manager/api/json_export.py b/moon_manager/moon_manager/api/json_export.py index feb4fde2..9ddcfc8d 100644 --- a/moon_manager/moon_manager/api/json_export.py +++ b/moon_manager/moon_manager/api/json_export.py @@ -1,3 +1,8 @@ +# Copyright 2018 Open Platform for NFV Project, Inc. and its contributors +# This software is distributed under the terms and conditions of the 'Apache-2.0' +# license which can be found in the file 'LICENSE' in this package distribution +# or at 'http://www.apache.org/licenses/LICENSE-2.0'. + import logging from flask_restful import Resource from python_moonutilities.security_functions import check_auth @@ -95,8 +100,8 @@ class JsonExport(Resource): JsonUtils.copy_field_if_exists(data_group["data"][data_key], data_dict, "name", str) JsonUtils.copy_field_if_exists(data_group["data"][data_key], data_dict, "description", str) else: - JsonUtils.copy_field_if_exists(data_group["data"][data_key]["value"], data_dict, "name", str) - JsonUtils.copy_field_if_exists(data_group["data"][data_key]["value"], data_dict, "description", str) + JsonUtils.copy_field_if_exists(data_group["data"][data_key], data_dict, "name", str) + JsonUtils.copy_field_if_exists(data_group["data"][data_key], data_dict, "description", str) JsonUtils.convert_id_to_name(policy_id, data_dict, "policy", "policy", PolicyManager, self._user_id) JsonUtils.convert_id_to_name(category_id, data_dict, "category", type_element + "_category", ModelManager, self._user_id, policy_key) |