mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-03-21 09:03:37 +08:00
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 <amp@ampcode.com>
This commit is contained in:
parent
24a6a7cbc6
commit
0b6d48def9
@ -430,9 +430,9 @@ class PromptServer():
|
|||||||
resp["asset"] = {
|
resp["asset"] = {
|
||||||
"id": result.ref.id,
|
"id": result.ref.id,
|
||||||
"name": result.ref.name,
|
"name": result.ref.name,
|
||||||
"asset_hash": result.asset.hash if result.asset else None,
|
"asset_hash": result.asset.hash,
|
||||||
"size": result.asset.size_bytes if result.asset else None,
|
"size": result.asset.size_bytes,
|
||||||
"mime_type": result.asset.mime_type if result.asset else None,
|
"mime_type": result.asset.mime_type,
|
||||||
"tags": result.tags,
|
"tags": result.tags,
|
||||||
}
|
}
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user