diff --git a/test/webapi/viewer/test_routes.py b/test/webapi/viewer/test_routes.py index 298f8e1ca..3066e27af 100644 --- a/test/webapi/viewer/test_routes.py +++ b/test/webapi/viewer/test_routes.py @@ -141,7 +141,10 @@ def setUp(self) -> None: def test_viewer_ext_contributions(self): response = self.fetch("/viewer/ext/contributions") - self.assertResourceNotFoundResponse(response) + self.assertResponseOK(response) + self.assertEqual( + {"result": {"extensions": [], "contributions": {}}}, response.json() + ) def test_viewer_ext_layout(self): response = self.fetch( diff --git a/xcube/webapi/viewer/routes.py b/xcube/webapi/viewer/routes.py index 40287be74..5357d988a 100644 --- a/xcube/webapi/viewer/routes.py +++ b/xcube/webapi/viewer/routes.py @@ -160,7 +160,9 @@ def new_key(self, length: int = 8) -> str: class ViewerExtHandler(ApiHandler[ViewerContext]): def do_get_contributions(self): if self.ctx.ext_ctx is None: - self._write_no_ext_status() + self._write_response( + ExtResponse.success({"extensions": [], "contributions": {}}) + ) else: self._write_response(get_contributions(self.ctx.ext_ctx))