From 41467471e25e7797edc7263c460e95c4e32d765d Mon Sep 17 00:00:00 2001 From: codex Date: Tue, 24 Nov 2026 16:56:34 +0000 Subject: [PATCH] =?UTF-8?q?=D0=A0=D0=B0=D0=B7=D0=BB=D0=B8=D1=87=D0=B0?= =?UTF-8?q?=D1=82=D1=8C=20=D1=87=D0=B8=D1=81=D0=BB=D0=BE=20=D1=80=D0=B0?= =?UTF-8?q?=D1=81=D0=BF=D0=BE=D0=B7=D0=BD=D0=B0=D0=BD=D0=BD=D1=8B=D1=85=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=BF=D0=B8=D1=81=D0=B5=D0=B9=20=D0=B8=20=D0=BE?= =?UTF-8?q?=D1=82=D1=81=D1=83=D1=82=D1=81=D1=82=D0=B2=D0=B8=D0=B5=20=D0=B4?= =?UTF-8?q?=D0=B0=D0=BD=D0=BD=D1=8B=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/services/admin_data.py | 3 ++- app/templates/employee_detail.html | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/services/admin_data.py b/app/services/admin_data.py index ab8fa31..9a78a99 100644 --- a/app/services/admin_data.py +++ b/app/services/admin_data.py @@ -125,6 +125,7 @@ def employee_display_payload(employee: Employee, *, sections=None) -> dict[str, phones = _clean_list(contacts.get("phones")) degree_values = academic_degrees(data) education = [s for s in sections if isinstance(s, dict) and s.get("type") == "additional_education"] + dpo_count = sum(len(s.get("items", [])) for s in education) return { "id": employee.id, "full_name": employee.full_name, @@ -141,7 +142,7 @@ def employee_display_payload(employee: Employee, *, sections=None) -> dict[str, "address": contacts.get("address"), "academic_degree_text": "; ".join(degree_values), "publications_count": _count_section_items(sections, "publications"), - "dpo_count": sum(len(s.get("items", [])) for s in education) if education else None, + "dpo_count": dpo_count or None, "dpo_uncertain": any(not s.get("items") or s.get("unresolved") or s.get("unresolved_documents") for s in education), "courses_count": _count_section_items(sections, "courses_by_year"), "news_count": len(stored_news_links) or _count_section_items(sections, "news"), diff --git a/app/templates/employee_detail.html b/app/templates/employee_detail.html index 5b08eb5..8356bea 100644 --- a/app/templates/employee_detail.html +++ b/app/templates/employee_detail.html @@ -216,7 +216,7 @@ {% else %} {% if section.type == "additional_education" and section.list_items %} -

Всего: {{ section.list_items | length }}

+

Распознано записей: {{ section.list_items | length }}

{% endif %} {% if section.paragraphs %} {% for paragraph in section.paragraphs %}