From 11b8bb5308361cca14ad184a6737b273b7e4ca46 Mon Sep 17 00:00:00 2001 From: xiayifan Date: Wed, 15 Apr 2020 16:29:37 +0800 Subject: [PATCH] =?UTF-8?q?image=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mindinsight/lineagemgr/common/validator/validate.py | 2 +- mindinsight/ui/src/views/train-manage/image.vue | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mindinsight/lineagemgr/common/validator/validate.py b/mindinsight/lineagemgr/common/validator/validate.py index 44209b2..8883a2c 100644 --- a/mindinsight/lineagemgr/common/validator/validate.py +++ b/mindinsight/lineagemgr/common/validator/validate.py @@ -412,7 +412,7 @@ def validate_user_defined_info(user_defined_info): if not isinstance(user_defined_info, dict): log.error("Invalid user defined info. It should be a dict.") raise LineageParamTypeError("Invalid user defined info. It should be dict.") - for key, value in user_defined_info: + for key, value in user_defined_info.items(): if not isinstance(key, str): error_msg = "Dict key type {} is not supported in user defined info." \ "Only str is permitted now.".format(type(key)) diff --git a/mindinsight/ui/src/views/train-manage/image.vue b/mindinsight/ui/src/views/train-manage/image.vue index 402955c..7ee2744 100644 --- a/mindinsight/ui/src/views/train-manage/image.vue +++ b/mindinsight/ui/src/views/train-manage/image.vue @@ -498,8 +498,8 @@ export default { for (let i = oldTagListLength - 1; i >= 0; i--) { if (!newTagDictionaries[this.tagOperateList[i].label]) { dataRemoveFlag = true; - this.tagOperateList.splice(i, 1); delete this.oriDataDictionaries[this.tagOperateList[i].label]; + this.tagOperateList.splice(i, 1); } } // Delete the old data from the image list and update the dictionary -- GitLab