fix(1c): normalize common template descriptor evidence
This commit is contained in:
@@ -42427,7 +42427,18 @@ def metadata_object_templates(payload: dict[str, Any]) -> dict[str, Any]:
|
||||
"timeout_seconds": timeout_seconds,
|
||||
}
|
||||
)
|
||||
classified_parts = parts_result.get("parts") if isinstance(parts_result.get("parts"), list) else []
|
||||
classified_parts = []
|
||||
for raw_part in parts_result.get("parts") or []:
|
||||
if not isinstance(raw_part, dict):
|
||||
continue
|
||||
classified_part = dict(raw_part)
|
||||
classification = classified_part.get("classification") if isinstance(classified_part.get("classification"), dict) else {}
|
||||
if classification.get("role"):
|
||||
classified_part["role"] = classification.get("role")
|
||||
descriptor_type_code = template_descriptor_type_code_from_part(classified_part)
|
||||
if descriptor_type_code is not None:
|
||||
classified_part["descriptor_type_code"] = descriptor_type_code
|
||||
classified_parts.append(classified_part)
|
||||
common_summary = public_template_summary(classified_parts, include_storage=include_storage) if classified_parts else {}
|
||||
templates = []
|
||||
for template_item in direct.get("templates") or []:
|
||||
|
||||
Reference in New Issue
Block a user