Unterscheide Eingang und Ausgang an der Einbindung und ermoegliche Umbenennen, Archivieren, Loeschen und Verschieben.
Deploy Development / deploy (push) Successful in 26s
Test Suite / pytest-backend (push) Successful in 1m4s
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-17 18:30:26 +02:00
1 parent 20625b4596
commit ad6240a5da
27 files changed
+1191 -88

No files matched your search

+6 -1
View File
@@ -1,4 +1,4 @@
"""Bounded note documents. Only paragraph text is stored."""
"""Bounded note documents. Paragraphs or one Markdown block are stored."""
from __future__ import annotations
@@ -9,6 +9,11 @@ def clean_document(document: dict) -> dict:
blocks = document.get("blocks")
if not isinstance(blocks, list) or len(blocks) > 400:
raise unprocessable("Die Notiz hat kein gültiges Dokument.")
if len(blocks) == 1 and isinstance(blocks[0], dict) and blocks[0].get("type") == "markdown":
text = blocks[0].get("text")
if not isinstance(text, str) or len(text) > 100_000:
raise unprocessable("Die Notiz enthält einen nicht unterstützten Block.")
return {"version": 1, "blocks": [{"type": "markdown", "text": text}]}
clean = []
for block in blocks:
if not isinstance(block, dict) or set(block) - {"type", "text"}: