Skip to content
This repository was archived by the owner on Feb 4, 2021. It is now read-only.

Commit d0f3850

Browse files
committed
Fix rollback
1 parent 90f985f commit d0f3850

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

infra/store/profile/profile_store.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ func (s *profileStoreImpl) CreateOrUpdateProfile(userID model.UserID, profile *r
3232
if profile.ID == 0 {
3333
err := profile.Insert(s.ctx, tx, boil.Infer())
3434
if err != nil {
35-
_ = tx.Rollback()
3635
return errors.WithStack(err)
3736
}
3837
u := record.User{
@@ -41,13 +40,11 @@ func (s *profileStoreImpl) CreateOrUpdateProfile(userID model.UserID, profile *r
4140
}
4241
_, err = u.Update(s.ctx, tx, boil.Whitelist("profile_id", "updated_at"))
4342
if err != nil {
44-
_ = tx.Rollback()
4543
return errors.WithStack(err)
4644
}
4745
} else {
4846
_, err := profile.Update(s.ctx, tx, boil.Infer())
4947
if err != nil {
50-
_ = tx.Rollback()
5148
return errors.WithStack(err)
5249
}
5350
}

0 commit comments

Comments
 (0)