From fd239d99f92812fa0ef8ad0ec6af95a64514fdfc Mon Sep 17 00:00:00 2001 From: gilesb Date: Thu, 8 Jan 2026 19:18:41 +0000 Subject: [PATCH] Fix f-string syntax error in IPFS display Build ipfs_html separately to avoid nested f-string issues. Co-Authored-By: Claude Opus 4.5 --- server.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/server.py b/server.py index c545439..271caf9 100644 --- a/server.py +++ b/server.py @@ -810,6 +810,18 @@ async def ui_asset_detail(name: str, request: Request): if tags: tags_html = " ".join([f'{t}' for t in tags]) + # IPFS display + if ipfs_cid: + local_gateway = f'Local' if IPFS_GATEWAY_URL else '' + ipfs_html = f'''{ipfs_cid} +
+ {local_gateway} + ipfs.io + dweb.link +
''' + else: + ipfs_html = 'Not on IPFS' + # Provenance section - for rendered outputs provenance_html = "" if provenance: @@ -940,12 +952,7 @@ async def ui_asset_detail(name: str, request: Request):

IPFS

- {f'''{ipfs_cid} -
- {f'Local' if IPFS_GATEWAY_URL else ''} - ipfs.io - dweb.link -
''' if ipfs_cid else 'Not on IPFS'} + {ipfs_html}