Fix input preview hash -> cid key mismatch
Template uses inp.cid and input.cid but router created previews with 'hash' key. Fixed both input_previews and run_inputs to use 'cid'. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -278,7 +278,7 @@ async def get_run(
|
||||
except Exception:
|
||||
pass
|
||||
run_inputs.append({
|
||||
"hash": input_hash,
|
||||
"cid": input_hash,
|
||||
"name": f"Input {i + 1}",
|
||||
"media_type": media_type,
|
||||
})
|
||||
@@ -407,7 +407,7 @@ async def list_runs(
|
||||
inputs = run.get("inputs", [])
|
||||
if isinstance(inputs, list):
|
||||
for input_hash in inputs[:3]:
|
||||
preview = {"hash": input_hash, "media_type": None}
|
||||
preview = {"cid": input_hash, "media_type": None}
|
||||
try:
|
||||
cache_path = cache_manager.get_by_cid(input_hash)
|
||||
if cache_path and cache_path.exists():
|
||||
|
||||
Reference in New Issue
Block a user