Skip to content

Commit

Permalink
Prevent adding bestMatches to stock quote requests
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed Apr 9, 2024
1 parent e09baf1 commit bea5666
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion neon_hana/mq_service_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def _validate_api_proxy_response(response: dict, query_params: dict):
resp = json.loads(response['content'])
if query_params.get('service') == "alpha_vantage":
resp['service'] = query_params['service']
if query_params.get("region"):
if query_params.get("region") and resp.get('bestMatches'):
filtered = [
stock for stock in resp.get("bestMatches")
if stock.get("4. region") == query_params["region"]]
Expand Down

0 comments on commit bea5666

Please sign in to comment.