Skip to content

Commit

Permalink
fix: remove preload
Browse files Browse the repository at this point in the history
  • Loading branch information
cosinlink committed May 16, 2024
1 parent c666fce commit 7495395
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dao/listing.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func (dao *DbListingDao) Create(context context.Context, listing *database.Listi

func (dao *DbListingDao) GetByGroupId(context context.Context, groupId int64) (database.Listing, error) {
var item = database.Listing{}
if err := dao.db.Preload("Stats").Where("group_id = ?", groupId).Take(&item).Error; err != nil {
if err := dao.db.Where("group_id = ?", groupId).Take(&item).Error; err != nil {
return item, err
}
return item, nil
Expand Down

0 comments on commit 7495395

Please sign in to comment.