Validate item template formatter hints
This commit is contained in:
@@ -318,6 +318,10 @@ def _template_action_family(metadata: dict[str, Any]) -> str:
|
||||
return item_template_policy.template_action_family(metadata)
|
||||
|
||||
|
||||
def _template_formatter_hints(metadata: dict[str, Any]) -> dict[str, list[str]]:
|
||||
return item_template_policy.formatter_hints(metadata)
|
||||
|
||||
|
||||
def _merge_position_keys(primary: list[str], fallback: list[str]) -> list[str]:
|
||||
return item_template_policy.merge_position_keys(primary, fallback)
|
||||
|
||||
@@ -3757,6 +3761,7 @@ def _build_custom_row(
|
||||
if is_pose_category:
|
||||
item_text = _sanitize_hardcore_environment_anchors(item_text)
|
||||
item_axis_values = _sanitize_hardcore_axis_values(item_axis_values)
|
||||
item_formatter_hints = _template_formatter_hints(item_template_metadata)
|
||||
subject_type = str(_merged_field(category, subcategory, item, "subject_type", "single_any"))
|
||||
context = _subject_context(person_rng, subject_type, ethnicity, figure, no_plus_women, no_black, women_count, men_count)
|
||||
character_slots = _parse_character_cast(character_cast)
|
||||
@@ -4029,6 +4034,7 @@ def _build_custom_row(
|
||||
"custom_item": item_name,
|
||||
"item_axis_values": item_axis_values,
|
||||
"item_template_metadata": item_template_metadata,
|
||||
"formatter_hints": item_formatter_hints,
|
||||
"scene_text": scene,
|
||||
"location_config": parsed_location_config if _location_config_active(parsed_location_config) else {},
|
||||
"pose": pose,
|
||||
|
||||
Reference in New Issue
Block a user