diff --git a/src/modules/network_element/controller/ne_host.go b/src/modules/network_element/controller/ne_host.go index db9b2c3d..65daa5f9 100644 --- a/src/modules/network_element/controller/ne_host.go +++ b/src/modules/network_element/controller/ne_host.go @@ -78,7 +78,7 @@ func (s NeHostController) Add(c *gin.Context) { c.JSON(422, resp.CodeMsg(422001, errMsgs)) return } - if body.ID == 0 { + if body.ID != 0 { c.JSON(422, resp.CodeMsg(422002, "bind err: id not is empty")) return }