Schliesse das Ablegen an der Markierung ab und halte Anlagen und Belege getrennt, damit der Dialog erscheint und zugeordnete Unterlagen im Uebergabepaket nur beim Schreiben stehen.
Deploy Development / deploy (push) Successful in 27s
Test Suite / pytest-backend (push) Successful in 1m41s
Test Suite / smoke-dev (push) Successful in 0s
Test Suite / frontend-build (push) Successful in 8s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-10-18 11:35:03 +02:00
1 parent be027a1025
commit 9f5327f3be
5 files changed
+457 -234

No files matched your search

+14
View File
@@ -272,6 +272,8 @@ def _matter_node(conn, actor, matter, page: Ctx, root: bool) -> ExportNode:
children: list[ExportNode] = []
children.extend(_chapter_nodes(conn, actor, page, chapters, grouped))
for binding in grouped.get(None, []):
if not _stands_in_chapter(binding):
continue
children.append(_binding_node(conn, actor, binding, page))
rows = conn.execute(
"SELECT * FROM matters WHERE parent_matter_id = %s AND deleted_at IS NULL ORDER BY title, id",
@@ -293,6 +295,16 @@ def _matter_node(conn, actor, matter, page: Ctx, root: bool) -> ExportNode:
)
def _stands_in_chapter(binding: dict) -> bool:
"""A folded attachment or receipt stays under its letter, not as another chapter row."""
pack = binding.get("correspondence") or {}
if pack.get("fold") in {"attachment", "evidence"}:
return False
if pack.get("hosts"):
return False
return True
def _chapter_nodes(conn, actor, page, chapters: list[dict], grouped: dict[str | None, list]) -> list[ExportNode]:
by_parent: dict[str | None, list[dict]] = {}
for chapter in chapters:
@@ -305,6 +317,8 @@ def _chapter_nodes(conn, actor, page, chapters: list[dict], grouped: dict[str |
nested = build(chapter["id"], chapter_path)
items = []
for item in grouped.get(chapter["id"], []):
if not _stands_in_chapter(item):
continue
node = _binding_node(conn, actor, item, page)
node.relation = f"Kapitel: {chapter_path}"
items.append(node)