From 837f9a64422fd11a20868d97c16f2ccd252d0eac Mon Sep 17 00:00:00 2001 From: gilesb Date: Sat, 10 Jan 2026 15:08:03 +0000 Subject: [PATCH] Add defensive check for null asset in publish Prevents NoneType subscript error if L2 returns null asset. Co-Authored-By: Claude Opus 4.5 --- server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.py b/server.py index 4ce634c..b6d9b8c 100644 --- a/server.py +++ b/server.py @@ -4029,7 +4029,7 @@ async def ui_publish_run(run_id: str, request: Request): result = resp.json() # Pin the output and record L2 share - if run.output_hash: + if run.output_hash and result.get("asset"): await database.update_item_metadata(run.output_hash, ctx.actor_id, pinned=True, pin_reason="published") # Record L2 share so UI shows published status cache_path = get_cache_path(run.output_hash)