Skip to content

Commit

Permalink
fix: use case insensitive for file search
Browse files Browse the repository at this point in the history
  • Loading branch information
harsh4723 committed Oct 26, 2024
1 parent 3dc0b63 commit 33311ec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/go/0chain.net/blobbercore/reference/ref.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ func GetReferenceByLookupHashForDownload(ctx context.Context, allocationID, path
func GetReferencesByName(ctx context.Context, allocationID, name string) (refs []*Ref, err error) {
db := datastore.GetStore().GetTransaction(ctx)
err = db.Model(&Ref{}).
Where("allocation_id = ? AND name LIKE ?", allocationID, "%"+name+"%").
Where("allocation_id = ? AND name ILIKE ?", allocationID, "%"+name+"%").
Limit(20).
Find(&refs).Error
if err != nil {
Expand Down

0 comments on commit 33311ec

Please sign in to comment.