If possible, check if station has a market at all before sending empty commodities list.
- Dominant language
- Python
- Stars
- 1.3k
- Forks
- 182
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
Whilst listeners can do a sanity check their end (did they already have market data for the station in question?), it would probably be good of us to not send an empty commodities list if:
1. The station is *not* a Fleet Carrier.
1. AND we can detect if the station normally has a market available.
For that second condition hopefully the CAPI `/market` -> `services` -> `commodities` value is the correct thing to check. Needs testing.
The end aim here is to always send empty commodity lists for FCs (because they could possibly have completely disabled their market, not only run out of buy and sell orders), but to only send for all other stations if we think they definitely have a market.
Contributor guide
Research direction
Trace how the CAPI `/market` response, especially `services` and `commodities`, is converted into outgoing commodity lists. Compare behavior for Fleet Carriers and other station types, then test that empty lists are still sent for Fleet Carriers but are suppressed for non-carriers without a detected market.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100