Repository navigation
Fix: require marketCode in mandi-price select - #98
Closed
kelvinprabhu wants to merge 2 commits into
Closed
kelvinprabhu wants to merge 2 commits into
kelvinprabhu wants to merge 2 commits into
Conversation
Refuse a select whose market.marketCode is absent or empty before Agmarknet is called; without it the query widens to the whole district. Each on_select resource now carries market.marketCode, in the same place catalog-ondemand.yaml puts it.
|
📊 Test Coverage: ➖ Not applicable — no non-test Go files changed vs |
🛡️ Trivy security scan (CRITICAL,HIGH,MEDIUM,LOW)Go dependenciesNo findings at CRITICAL,HIGH,MEDIUM,LOW. Container imageNo findings at CRITICAL,HIGH,MEDIUM,LOW. |
kelvinprabhu
added a commit
that referenced
this pull request
Nov 3, 2026
…ields [#107] Refuse a select whose market.marketCode is absent or empty before Agmarknet is called; without it the query widens to the whole district. Each on_select resource carries market.marketCode, where catalog-ondemand.yaml puts it. Refuse a select whose supportedPriceFields lists a value outside the pack's Minimum/Maximum/Modal enum, which would otherwise return rows with no price. Supersedes the marketCode change in #98.
Collaborator
Author
|
CREATED ANOTHER. PR || #119 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #97
Closes #107
What
market.marketCodeis absent or empty is refused before Agmarknet is called.market.marketCode, in the same placecatalog-ondemand.yamlputs it.Why
Without a market code, the Agmarknet query covers the whole district, and the answer can't say which market a price belongs to.
Refusal
HTTP 400, signed NACK:
{"message":{"status":"NACK","error":{"code":"SCH_INVALID_FORMAT","message":"BAD Request: this capability needs a market code in market.marketCode, as the catalog lists it; without it the query widens to the whole district"}}}