Explorar el Código

角色重命名

xyxie hace 6 meses
padre
commit
ac7dbf36d2
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      controllers/sys_role.go

+ 1 - 1
controllers/sys_role.go

@@ -119,7 +119,7 @@ func (this *SysRoleController) Edit() {
 		br.ErrMsg = "获取重名角色失败, Err: " + e.Error()
 		br.ErrMsg = "获取重名角色失败, Err: " + e.Error()
 		return
 		return
 	}
 	}
-	if exists != nil && exists.RoleId != item.RoleId {
+	if e == nil && exists.RoleId > 0 && exists.RoleId != item.RoleId {
 		br.Msg = "名称已存在,请重新输入"
 		br.Msg = "名称已存在,请重新输入"
 		return
 		return
 	}
 	}