maint: remove template helpers orphaned by the payload removal
json_safe and maybe_store_string were reachable only through collect_template_payload (removed in 055b256). Caught by re-running the orphan scan after that commit rather than assuming the first pass was final. Checked: 1 occurrence each repo-wide (grep -a), 0 refs in ComfyUI core/FunUI. Tests: 22 failed / 460 passed, identical to baseline. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
51093cde70
commit
8d4ed22853
@@ -1005,18 +1005,8 @@ def now_iso():
|
||||
return datetime.now(timezone.utc).replace(microsecond=0).isoformat()
|
||||
|
||||
|
||||
def json_safe(value):
|
||||
try:
|
||||
return json.loads(json.dumps(value))
|
||||
except (TypeError, ValueError):
|
||||
return copy.deepcopy(value)
|
||||
|
||||
|
||||
def maybe_store_string(template, field, value, update_only):
|
||||
if isinstance(value, str) and value.strip():
|
||||
template[field] = value
|
||||
elif not update_only:
|
||||
template.pop(field, None)
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user