Skip to content

Commit

Permalink
fix transcation lock issue
Browse files Browse the repository at this point in the history
  • Loading branch information
cxiang03 committed Dec 31, 2020
1 parent 8ac3615 commit 1be54d0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions nested_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,7 @@ func Create(db *gorm.DB, source, parent interface{}) error {
}
}

// skip the table & scope, since they should be all setup by caller
return db.Create(source).Error
return tx.Create(source).Error
})
}

Expand Down

0 comments on commit 1be54d0

Please sign in to comment.