fix
This commit is contained in:
parent
14f0dd2b22
commit
5bedfc9237
|
@ -218,21 +218,17 @@ func (u *FsUserModel) RegisterByFusen(ctx context.Context, token *auth.RegisterT
|
|||
// txUserInfo.Statement.Table
|
||||
|
||||
if err != nil {
|
||||
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
err = txUserInfo.Create(uinfo).Error
|
||||
if err == gorm.ErrRecordNotFound {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
err = fssql.MetadataModulePATCH(txUserInfo, "profile", FsUser{}, metadata, "user_id = ?", *uinfo.UserId)
|
||||
err = fssql.MetadataModulePATCH(txUserInfo, "profile", FsUserInfo{}, metadata, "user_id = ?", *uinfo.UserId)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
}
|
||||
return err
|
||||
})
|
||||
|
|
|
@ -116,7 +116,7 @@ func MetadataResourcePATCH(tx *gorm.DB, rid string, updateMetadata any, values .
|
|||
ELSE JSON_MERGE_PATCH(metadata, ?)
|
||||
END
|
||||
cond, ok := values[0].(string)
|
||||
WHERE resource_id = '%s'` + "and " + cond + `;`
|
||||
WHERE resource_id = '%s'` + " and " + cond + `;`
|
||||
}
|
||||
|
||||
var err error
|
||||
|
|
Loading…
Reference in New Issue
Block a user