Files
galaxy/test
mvdbeek 8308bdbf5b LazyTool.to_dict: always materialise; fast path was incomplete
The entry-only fast path was missing fields the ``/api/tools/<id>``
show endpoint serves (``xrefs``, ``inputs`` when ``io_details=False``,
…). The flat ``/api/tools?in_panel=False`` listing — the only caller
that benefits from the fast path — already bypasses this method:
``services/tools.py:list_tools`` walks ``tool_index.list_all()`` and
calls ``entry.to_api_dict()`` directly.

Always materialise here; the entry-only dict survives as the fallback
when materialise itself raises (a tool whose XML the parameter
factory chokes on — ``upload_dataset``, ``column="value"``, …) so the
caller still gets *something* renderable rather than a 500.

Tests updated:
- ``test_to_dict_fast_path_does_not_materialise`` → renamed to
  ``test_to_dict_falls_back_to_entry_dict_when_materialise_fails``.
- ``test_to_dict_link_details_materialises_exactly_once`` → renamed
  for accuracy; behaviour unchanged.
2026-07-28 17:27:20 +02:00
..
2026-01-20 10:25:45 +00:00