Add defensive check for null asset in publish
Prevents NoneType subscript error if L2 returns null asset. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user