Skip to content

Commit

Permalink
Merge pull request #517 from traPtitech/fix/seat_repository_comment
Browse files Browse the repository at this point in the history
UpdateSeatsStatusのエラーハンドリング修正
  • Loading branch information
mazrean authored Oct 27, 2022
2 parents e5bda9e + a3f375d commit 984d186
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/repository/gorm2/seat.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ func (s *Seat) UpdateSeatsStatus(ctx context.Context, seatIDs []values.SeatID, s
Where("id IN ?", seatIDs).
Update("status_id", dbStatus.ID)
if result.Error != nil {
return fmt.Errorf("failed to update seats status: %w", err)
return fmt.Errorf("failed to update seats status: %w", result.Error)
}

if result.RowsAffected == 0 {
Expand Down

0 comments on commit 984d186

Please sign in to comment.