use orm.Create replace orm.Save method

This commit is contained in:
liugq 2023-02-23 09:15:05 +08:00
parent 5d002145b9
commit 67382361a1
1 changed files with 2 additions and 2 deletions

View File

@ -486,7 +486,7 @@ func (module *Module) initialize(w http.ResponseWriter, r *http.Request, ps http
}
//保存默认集群
err=orm.Save(nil, &toSaveCfg)
err=orm.Create(nil, &toSaveCfg)
if err!=nil{
panic(err)
}
@ -510,7 +510,7 @@ func (module *Module) initialize(w http.ResponseWriter, r *http.Request, ps http
Name: rbac.RoleAdminName,
})
user.Roles=role
err=orm.Save(nil, &user)
err=orm.Create(nil, &user)
if err!=nil{
panic(err)
}