use orm.Create replace orm.Save method
This commit is contained in:
parent
5d002145b9
commit
67382361a1
|
@ -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{
|
if err!=nil{
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
@ -510,7 +510,7 @@ func (module *Module) initialize(w http.ResponseWriter, r *http.Request, ps http
|
||||||
Name: rbac.RoleAdminName,
|
Name: rbac.RoleAdminName,
|
||||||
})
|
})
|
||||||
user.Roles=role
|
user.Roles=role
|
||||||
err=orm.Save(nil, &user)
|
err=orm.Create(nil, &user)
|
||||||
if err!=nil{
|
if err!=nil{
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue