mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-31 02:28:09 +08:00
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.