Skip to content

Commit

Permalink
lint fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sCuz12 committed Feb 6, 2024
1 parent 663ffe6 commit c1c9daa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions database/gorm/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2847,12 +2847,12 @@ func (s *QueryTestSuite) TestWhereHas() {
s.Nil(query.Select(orm.Associations).Create(&user3))
s.Nil(query.Select(orm.Associations).Create(&user4))

resultQuery, err := query.WhereHas(Book{}, "user_id", func(query ormcontract.Query) (ormcontract.Query, error) {
resultQuery, _ := query.WhereHas(Book{}, "user_id", func(query ormcontract.Query) (ormcontract.Query, error) {
modifiedQuery := query.Where("Name = ?", "Book A")
return modifiedQuery, nil
})

err = resultQuery.Find(&users)
err := resultQuery.Find(&users)

if err != nil {
// Handle the error, maybe log it or return it
Expand Down

0 comments on commit c1c9daa

Please sign in to comment.