Skip to content

Commit

Permalink
Merge pull request #15 from Ulas-Scan/development
Browse files Browse the repository at this point in the history
fix: syntax "%" on histories repository
  • Loading branch information
iyoubee authored Jun 15, 2024
2 parents ed008f3 + 73e63b1 commit ea40474
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion repository/history.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func (r *historyRepository) GetHistories(ctx context.Context, tx *gorm.DB, dto d

scope := tx.WithContext(ctx)
if dto.ProductName != "" {
scope = scope.Where("product_name LIKE %?%", dto.ProductName)
scope = scope.Where("product_name LIKE ?", "%"+dto.ProductName+"%")
}

// Query the paginated records
Expand Down

0 comments on commit ea40474

Please sign in to comment.