Skip to content

Commit

Permalink
update pk when insert conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
457813723 committed Nov 13, 2023
1 parent 8650ee5 commit 24ae947
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dao/dao_account_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ func (d *DbDao) ConfirmProposal(incomeCellInfos []TableIncomeCellInfo, accountIn

if len(cidPks) > 0 {
if err := tx.Clauses(clause.OnConflict{
DoUpdates: clause.AssignmentColumns([]string{}),
DoUpdates: clause.AssignmentColumns([]string{
"pk",
}),
}).Create(&cidPks).Error; err != nil {
return err
}
Expand Down

0 comments on commit 24ae947

Please sign in to comment.