Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: return only user requested DataRequestSearch item if id is present #856

Merged
merged 1 commit into from Oct 11, 2023

Conversation

alambare-csgroup
Copy link
Collaborator

@alambare-csgroup alambare-csgroup commented Oct 3, 2023

Return the single requested item if the requested item id is found in the results.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2023

Test Results

       4 files  ±0         4 suites  ±0   5m 42s ⏱️ - 1m 8s
   431 tests ±0     428 ✔️ ±0    3 💤 ±0  0 ±0 
1 724 runs  ±0  1 648 ✔️ ±0  76 💤 ±0  0 ±0 

Results for commit f9a5bdb. ± Comparison against base commit a2506e6.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2023

Code Coverage (Ubuntu)

File Coverage
All files 82%

Minimum allowed coverage is 70%

Generated by 🐒 cobertura-action against f9a5bdb

@github-actions
Copy link
Contributor

github-actions bot commented Oct 3, 2023

Code Coverage (Windows)

File Coverage
All files 76%

Minimum allowed coverage is 70%

Generated by 🐒 cobertura-action against f9a5bdb

@sbrunato sbrunato changed the title fix: return only user requested item if id is present fix: return only user requested DataRequestSearch item if id is present Oct 5, 2023
Comment on lines 320 to 326
# postprocess filtering needed when provider does not natively offer
# filtering by id
if "id" in kwargs:
results = [
r for r in results if r["productInfo"]["product"] == kwargs["id"]
] or results

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these test & filtering should be done after normalizing by checking products[].properties["id"]

@sbrunato sbrunato merged commit 5165658 into develop Oct 11, 2023
12 checks passed
@sbrunato sbrunato deleted the fix-wekeo-single-id branch October 11, 2023 16:02
@sbrunato sbrunato added this to the 2.11.0 milestone Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants