From 48604a7b2aa680df5d83fde3eefa1e4d4cfc0130 Mon Sep 17 00:00:00 2001 From: codex Date: Thu, 26 Nov 2026 18:28:45 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A1=D0=BA=D1=80=D1=8B=D1=82=D1=8C=20=D1=81?= =?UTF-8?q?=D0=BB=D1=83=D0=B6=D0=B5=D0=B1=D0=BD=D1=83=D1=8E=20=D1=81=D0=B2?= =?UTF-8?q?=D0=BE=D0=B4=D0=BA=D1=83=20=D0=BF=D0=BE=D0=B4=D1=82=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=D0=B6=D0=B4=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=94=D0=9F=D0=9E?= =?UTF-8?q?=20=D0=B2=20=D0=BA=D0=B0=D1=80=D1=82=D0=BE=D1=87=D0=BA=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/templates/employee_dpo.html | 9 --------- app/version.py | 6 +++--- pyproject.toml | 4 ++-- tests/test_api.py | 2 +- tests/test_council.py | 2 +- tests/test_users.py | 4 ++++ 6 files changed, 11 insertions(+), 16 deletions(-) diff --git a/app/templates/employee_dpo.html b/app/templates/employee_dpo.html index ec8c367..32f51cd 100644 --- a/app/templates/employee_dpo.html +++ b/app/templates/employee_dpo.html @@ -11,18 +11,9 @@ {% endmacro %}
-

Проверка ДПО

- {% if review %} -

Подтверждено курсов: {{ review.courses | length }} · {{ review.updated_by }} · {{ review.updated_at | admin_datetime }}

- {% if review.courses %}
    {% for course in review.courses %} -
  1. {{ course.title }} · {{ kinds[course.kind] }}{% if course.year %} · {{ course.year }}{% endif %}{% if course.evidence %} · {{ course.evidence }}{% endif %}
  2. - {% endfor %}
{% endif %} - {% endif %} {% if employee_view.dpo_uncertain %}

Количество ДПО требует проверки

{% if review %}

Сведения о ДПО изменились. В справочнике учтён последний подтверждённый список.

{% endif %} - {% endif %} - {% if employee_view.dpo_uncertain or review %} {% for section in employee_view.sections if section.type == 'additional_education' %}

{{ section.title }} · сведения профиля

{% if not section.list_items %}

В разделе ДПО не удалось выделить отдельные записи.

{% endif %} diff --git a/app/version.py b/app/version.py index 8a0f729..8575fe8 100644 --- a/app/version.py +++ b/app/version.py @@ -1,3 +1,3 @@ -APP_VERSION = "2.4.0" -FRONTEND_VERSION = "2.4.0" -BACKEND_VERSION = "2.4.0" +APP_VERSION = "2.4.1" +FRONTEND_VERSION = "2.4.1" +BACKEND_VERSION = "2.4.1" diff --git a/pyproject.toml b/pyproject.toml index 935ad71..60b4ee3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "miem-workers" -version = "2.4.0" +version = "2.4.1" description = "MIEM employees parser, admin API, and web admin" requires-python = ">=3.11" dependencies = [ @@ -11,7 +11,7 @@ dependencies = [ "jinja2>=3.1.4", "lxml>=5.2.0", "psycopg[binary]>=3.2.0", - "pydantic-settings>=2.4.0", + "pydantic-settings>=2.4.1", "openpyxl>=3.1.5,<4", "python-multipart>=0.0.9", "requests>=2.32.0", diff --git a/tests/test_api.py b/tests/test_api.py index 0af5303..be73d4a 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -22,7 +22,7 @@ def test_health_returns_versions(): response = TestClient(app).get("/api/health") assert response.status_code == 200 - assert response.json()["backend_version"] == "2.4.0" + assert response.json()["backend_version"] == "2.4.1" def test_api_employees_and_stats_require_admin_session(): diff --git a/tests/test_council.py b/tests/test_council.py index a3c6058..33e054a 100644 --- a/tests/test_council.py +++ b/tests/test_council.py @@ -230,7 +230,7 @@ def test_public_page_data_minimization_and_safe_links(db_session, export): assert "javascript:" not in fragment.text and "private@example.org" not in fragment.text assert "javascript:" not in response.text and "private@example.org" not in response.text assert "/admin/employees/" not in response.text and "/admin/logout" not in response.text - assert "Backend 2.4.0 · Frontend 2.4.0" in response.text + assert "Backend 2.4.1 · Frontend 2.4.1" in response.text assert "Вход в систему" in response.text assert client.get("/admin/directory", follow_redirects=False).status_code in (302, 303, 401, 403) assert "Сотрудники не найдены" in client.get("/admin/council?q=missing").text diff --git a/tests/test_users.py b/tests/test_users.py index 0a21ded..5cc4144 100644 --- a/tests/test_users.py +++ b/tests/test_users.py @@ -453,6 +453,10 @@ def test_reader_confirms_dpo_and_changed_sources_require_review(accounts): assert client.post(url, json=payload).status_code == 403 assert client.post(url, json=payload, headers=headers).status_code == 200 assert client.post(url, json=payload, headers=headers).status_code == 409 + panel = BeautifulSoup(client.get(url[:-4]).text, "html.parser").select_one("#unresolved-dpo") + assert "Подтверждено курсов" not in panel.get_text() + assert panel.select_one("ol") is None + assert panel.select_one("[data-rows] input[name=title]")["value"] == "Инженерная практика" assert not employee_detail_payload(employee)["dpo_uncertain"] result = list_employees_page(db, training_since_year=2025)["employees"] assert [row["dpo_count"] for row in result] == [1]