From ecc20c9a27dec60451128defed0ad4f54e38f27c Mon Sep 17 00:00:00 2001 From: Luke Mino-Altherr Date: Sat, 14 Mar 2026 22:38:40 -0400 Subject: [PATCH] Remove dead None guards on result.asset in upload handler register_file_in_place guarantees a non-None asset, so the 'if result.asset else None' checks were unreachable. Amp-Thread-ID: https://ampcode.com/threads/T-019cef5b-4cf8-723c-8a98-8fb8f333c133 Co-authored-by: Amp --- server.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server.py b/server.py index e07bdfbc7..173a28376 100644 --- a/server.py +++ b/server.py @@ -430,9 +430,9 @@ class PromptServer(): resp["asset"] = { "id": result.ref.id, "name": result.ref.name, - "asset_hash": result.asset.hash if result.asset else None, - "size": result.asset.size_bytes if result.asset else None, - "mime_type": result.asset.mime_type if result.asset else None, + "asset_hash": result.asset.hash, + "size": result.asset.size_bytes, + "mime_type": result.asset.mime_type, "tags": result.tags, } except Exception: