Skip to content

Commit

Permalink
z
Browse files Browse the repository at this point in the history
  • Loading branch information
everpcpc committed May 27, 2024
1 parent 07e6cf7 commit 68cb150
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/subject/mysql_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ func (r mysqlRepo) Count(
q = q.Where(r.q.Subject.Series.Is(filter.Series.Value))
}
if filter.Platform.Set {
q = q.Where(r.q.Subject.Infobox.Like(filter.Platform.Value))
q = q.Where(r.q.Subject.Infobox.Like(fmt.Sprintf("%%[%s]%%", filter.Platform.Value)))
}
if filter.Year.Set {
q = q.Where(r.q.SubjectField.Year.Eq(filter.Year.Value))
Expand Down Expand Up @@ -284,7 +284,7 @@ func (r mysqlRepo) Browse(
q = q.Where(r.q.Subject.Series.Is(filter.Series.Value))
}
if filter.Platform.Set {
q = q.Where(r.q.Subject.Infobox.Like(filter.Platform.Value))
q = q.Where(r.q.Subject.Infobox.Like(fmt.Sprintf("%%[%s]%%", filter.Platform.Value)))
}
if filter.Year.Set {
q = q.Where(r.q.SubjectField.Year.Eq(filter.Year.Value))
Expand Down

0 comments on commit 68cb150

Please sign in to comment.