Browse Source

Merge pull request '创建用户时忽略区块链服务报错' (#219) from fix-174 into V202108

Reviewed-on: https://git.openi.org.cn/OpenI/aiforge/pulls/219
Reviewed-by: avadesian <xuchx@pcl.ac.cn>
pull/235/head
avadesian 3 years ago
parent
commit
f221986704
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      models/user.go

+ 4
- 4
models/user.go View File

@@ -976,12 +976,12 @@ func CreateUser(u *User) (err error) {
result, err := blockchain.CreateBlockchainAccount() result, err := blockchain.CreateBlockchainAccount()
if err != nil { if err != nil {
log.Error("createBlockchainAccount failed:", err.Error()) log.Error("createBlockchainAccount failed:", err.Error())
return err
//return err
} else {
u.PublicKey = result.Payload["publickey"].(string)
u.PrivateKey = result.Payload["privatekey"].(string)
} }


u.PublicKey = result.Payload["publickey"].(string)
u.PrivateKey = result.Payload["privatekey"].(string)

sess := x.NewSession() sess := x.NewSession()
defer sess.Close() defer sess.Close()
if err = sess.Begin(); err != nil { if err = sess.Begin(); err != nil {


Loading…
Cancel
Save