- Ya
- 2 Septemba 2026, 20:54 UTC
- Mwandishi
- Kamo
- Ahadi ya
- 77c16bb
findMarketIdsWithActiveScripts asked only whether the SCRIPT was active, so a market the organization had retired still appeared as a sub-tab for as long as any script under it was live — and an agent would have been offered the pitch for a line of business nobody sells any more. The market's archived state matters as much as the script's, and reading it here means archiving a market takes its scripts out of the panel without anyone having to archive them one at a time. recordState IS NULL counts as active, matching LeadMarketRepository's own active query: rows predating the embeddable carry no state and are not archived. The settings tabs deliberately keep listing ACTIVE markets only, which is exactly what the sibling Vendors & Products tab does with the same endpoint. A script under a market that was archived after it was written is reached by unarchiving the market, the same way its vendors are.