ktmud commented on code in PR #20882:
URL: https://github.com/apache/superset/pull/20882#discussion_r931189352
##########
tests/integration_tests/viz_tests.py:
##########
@@ -739,19 +739,13 @@ def test_get_data_empty_null_keys(self):
"group": "All",
}
],
- "NULL": [
- {
- "values": [
- {"x": 100, "y": 10},
- {"x": 200, "y": 20},
- {"x": 300, "y": 30},
- ],
- "group": "All",
- }
- ],
}
self.assertEqual(data, expected)
+ form_data = {"groupby": [], "metrics": [None]}
Review Comment:
Should we add a test case where metric is a dict, too?
##########
superset/dashboards/api.py:
##########
@@ -383,8 +383,10 @@ def get_datasets(self, id_or_slug: str) -> Response:
self.dashboard_dataset_schema.dump(dataset) for dataset in
datasets
]
return self.response(200, result=result)
- except TypeError:
- return self.response_400(message=gettext("Dataset schema is
invalid."))
+ except (TypeError, ValueError) as err:
+ return self.response_400(
+ message=gettext(f"Dataset schema is invalid, caused by:
{str(err)}")
Review Comment:
Use `%s` for translatable text
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]