Skip to content
Snippets Groups Projects
Commit b2b64924 authored by Klaas Kliffen's avatar Klaas Kliffen :satellite:
Browse files

Merge branch 'grange-87_fix_empty_results_connector-patch-39434' into...

Merge branch 'grange-87_fix_empty_results_connector-patch-39434' into '87_fix_empty_results_connector'

Add warning if the basket is empty for a connector

See merge request astron-sdc/esap-userprofile-python-client!10
parents f64ce1a6 7114987b
No related branches found
No related tags found
2 merge requests!10Add warning if the basket is empty for a connector,!9Check items before concatenating
...@@ -149,6 +149,11 @@ class shopping_client: ...@@ -149,6 +149,11 @@ class shopping_client:
if len(items): if len(items):
converted_basket[connector.name] = pd.concat(items, axis=1) converted_basket[connector.name] = pd.concat(items, axis=1)
else:
warn(
f"Connector {connector.name} specified but no data found for it "
f"in shopping basket. Result will not contain an entry named {connector.name}."
)
return { return {
name: data.to_frame().T if data.ndim < 2 else data.T name: data.to_frame().T if data.ndim < 2 else data.T
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment