fix: BLS-Import-UI und Timeout beim Daten-Apply
Deploy Development / deploy (push) Successful in 1m30s
Build Test / pytest-backend (push) Successful in 9s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 21s

Datei-Button volle Breite, Import als Aktionsbutton, Batch-Upsert statt Einzel-INSERTs.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-09-12 14:49:47 +02:00
1 parent 7ccae33844
commit 8e964509d7
7 files changed
+170 -145

No files matched your search

+7
View File
@@ -2,6 +2,7 @@ from io import BytesIO
from openpyxl import Workbook
from bls.import_service import should_persist_value
from bls.parser import parse_components_xlsx, parse_foods_xlsx
@@ -37,3 +38,9 @@ def test_parse_foods_keeps_bls_code():
assert parsed["foods"][0]["name_de"] == "Hafer roh"
vals = {v["attr_key"]: v["value_num"] for v in parsed["foods"][0]["values"]}
assert vals.get("ENERCC") == 350
def test_persist_only_numeric_or_trace():
assert should_persist_value({"value_num": 1.2, "is_trace": False})
assert should_persist_value({"value_num": None, "is_trace": True})
assert not should_persist_value({"value_num": None, "is_trace": False})