Commit a37c72e4 by lepdou

bugfix_createitem

parent 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% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment