Report leads available for products with no allotment

FixSecurityService
Shipped
August 21, 2026 at 1:47 AM UTC
Author
Kamo
Commit
8452e34

/manage built its whole response by looping over allotments, calling countAssignablePool once per row. But the Manage-Credits grid lists products from the vendor catalogue, not from allotments — so a product nobody held a credit rule for was displayed with 0 available leads no matter how full its pool was. Eleven newly created Farm products read 0 against pools of 11 to 6,730 leads; the one product that did have allotments reported correctly, which made it look like a data problem with the other ten thousand leads. Now also returns leadsByProduct, covering every product in the market, from a single grouped query.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing