提交 a37c72e4 编写于 作者: L lepdou

bugfix_createitem

上级 f0c6e614
......@@ -73,6 +73,13 @@ public class PortalConfigService {
public ItemDTO createOrUpdateItem(String appId, Env env, String clusterName, String namespaceName, ItemDTO item){
NamespaceDTO namespace = namespaceAPI.loadNamespace(appId, env, clusterName, namespaceName);
if (namespace == null){
throw new BadRequestException(
"namespace:" + namespaceName + " not exist in env:" + env + ", cluster:" + clusterName);
}
item.setNamespaceId(namespace.getId());
return itemAPI.createOrUpdateItem(appId, env, clusterName, namespaceName, item);
}
......
......@@ -181,7 +181,6 @@ application_module.controller("ConfigNamespaceController",
$scope.createItem = function (namespace) {
switchTableViewOperType(TABLE_VIEW_OPER_TYPE.CREATE);
$scope.item = {};
$scope.item.namespaceId = namespace.namespace.id;
toOperationNamespaceName = namespace.namespace.namespaceName;
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册