diff --git a/pyproject.toml b/pyproject.toml index e465e86..044fc8e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "plba" -version = "0.3.6" +version = "0.3.7" description = "Platform runtime for business applications" readme = "README.md" requires-python = ">=3.11" diff --git a/src/app_runtime/control/trace_presenter.py b/src/app_runtime/control/trace_presenter.py index ec0576d..48b69af 100644 --- a/src/app_runtime/control/trace_presenter.py +++ b/src/app_runtime/control/trace_presenter.py @@ -260,7 +260,7 @@ class TraceResponseRenderer: return f"{record.message}, {json.dumps(record.attrs_json, ensure_ascii=False, separators=(',', ':'))}" def _related_trace_links(self, trace_view: TraceLogView, request: TraceQueryRequest) -> str: - links = [self._trace_link_item("current", trace_view.trace_id, request)] + links: list[str] = [] if trace_view.parent_id: links.append(self._trace_link_item("parent", trace_view.parent_id, request)) links.extend(self._trace_link_item("child", child_id, request) for child_id in trace_view.child_ids) diff --git a/tests/test_trace_endpoint.py b/tests/test_trace_endpoint.py index 5b8fd6d..188f63e 100644 --- a/tests/test_trace_endpoint.py +++ b/tests/test_trace_endpoint.py @@ -208,7 +208,7 @@ def test_trace_endpoint_returns_html_page_with_related_links() -> None: assert "filtered suspicious ticker" in response.text assert "2026-04-28T10:11:12+00:00 | INFO | ok" in response.text assert "2026-04-28T10:11:12+00:00 | WARNING | degraded" in response.text - assert 'href="/traces/trace-1?format=html&levels=ERROR%2CWARNING%2CINFO&attrs_json=true"' in response.text + assert 'href="/traces/trace-1?format=html&levels=ERROR%2CWARNING%2CINFO&attrs_json=true"' not in response.text assert 'href="/traces/parent-1?format=html&levels=ERROR%2CWARNING%2CINFO&attrs_json=true"' in response.text assert 'href="/traces/child-1?format=html&levels=ERROR%2CWARNING%2CINFO&attrs_json=true"' in response.text assert 'href="/traces/child-2?format=html&levels=ERROR%2CWARNING%2CINFO&attrs_json=true"' in response.text