cannot modify node-category to tenant

This commit is contained in:
Ulric Qin 2020-10-13 09:35:34 +08:00
parent 7f4dd8859e
commit 744980f119
2 changed files with 5 additions and 1 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash
# release version
version=3.1.1
version=3.1.2
CWD=$(cd $(dirname $0)/; pwd)
cd $CWD

View File

@ -151,6 +151,10 @@ func nodePut(c *gin.Context) {
bomb("cannot modify tenant's node-category")
}
if node.Pid > 0 && f.Cate == "tenant" {
bomb("cannot modify node-category to tenant")
}
err := node.Modify(f.Name, f.Cate, f.Note, f.AdminIds)
renderData(c, node, err)
}