xyxie 2 сар өмнө
parent
commit
5d26a066d9

+ 1 - 1
controllers/material/material.go

@@ -1648,7 +1648,7 @@ func (this *MaterialController) Rename() {
 		br.ErrMsg = "获取数据失败,Err:" + err.Error()
 		return
 	}
-	if err == nil {
+	if err == nil && exist != nil && exist.MaterialId > 0 {
 		br.Msg = "图片名称已存在"
 		return
 	}