fix: avoid Jinja dict method collisions in admin templates

This commit is contained in:
Anton
2026-04-29 12:11:16 +03:00
parent 5eaad38076
commit cdfbb26875
8 changed files with 13 additions and 11 deletions

View File

@@ -121,7 +121,7 @@ def list_employees_page(
order = desc(sort_column) if direction == "desc" else sort_column
employees = db.scalars(base_stmt.order_by(order).limit(limit).offset(offset)).all()
return {
"items": [employee_display_payload(employee) for employee in employees],
"employees": [employee_display_payload(employee) for employee in employees],
"total": total,
"limit": limit,
"offset": offset,
@@ -243,7 +243,7 @@ def _normalize_section(section: Any) -> dict[str, Any]:
"type": section_type,
"raw_text": raw_text,
"paragraphs": paragraphs,
"items": items,
"list_items": items,
"links": _normalize_links(section.get("links")),
"year_entries": _normalize_year_entries(section.get("year_entries")),
"publications": _normalize_publications(section.get("publications")),