Skip to content

Commit

Permalink
fix: Missing select on asset packages
Browse files Browse the repository at this point in the history
  • Loading branch information
zekiahmetbayar committed Jan 8, 2024
1 parent 2482d74 commit 55eb7ee
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/controllers/assets/assets.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ func AssetPackages(c *fiber.Ctx) error {
return err
}

db := database.Connection().Model(&entities.Package{}).
var count int64
db := database.Connection().
Model(&entities.Package{}).
Joins("left join asset_packages on asset_packages.package_id = packages.id").
Where("asset_id = ?", uuid)
Where("asset_id = ?", uuid).Count(&count)

// Apply search, if exists
if c.Query("search") != "" {
Expand Down

0 comments on commit 55eb7ee

Please sign in to comment.