Uebernimm Enum-Listen und Filtergruppen in die Taxonomie, speichere Suchtreffer als Kandidaten und lasse CI das vorhandene API-Image nutzen.
Deploy Development / deploy (push) Successful in 2m6s
Test Suite / pytest-backend (push) Failing after 14s
Test Suite / smoke-dev (push) Successful in 1s
Test Suite / frontend-checks (push) Successful in 28s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
LarsandCursor committed 2026-10-04 15:12:51 +02:00
1 parent 2117ca6b54
commit 68a8e3d945
23 files changed
+481 -118

No files matched your search

+21 -3
View File
@@ -51,9 +51,7 @@ def _encode_mapping(mapping: dict[str, Any], criterion: dict[str, Any]) -> list[
if encoding.get("encoding_type") == "RANGE_TOKEN":
return _encode_range_token(mapping, criterion)
if param == "xf":
filter_key = str(mapping["external_filter_key"])
source_value = _xf_value(mapping, criterion)
return [("xf", f"{filter_key}_{_plus(source_value)}")]
return _encode_xf(mapping, criterion)
if param in {"minp", "maxp", "prmin", "prmax", "asuch", "fs"}:
return [(param, str(criterion.get("value")))]
template = encoding.get("value_template")
@@ -112,10 +110,30 @@ def _lookup_option(mapping: dict[str, Any], value: Any) -> str | None:
return None
def _encode_xf(mapping: dict[str, Any], criterion: dict[str, Any]) -> list[tuple[str, str]]:
filter_key = str(mapping["external_filter_key"])
raw = criterion.get("value")
values = raw if isinstance(raw, list) else [raw]
fragments: list[tuple[str, str]] = []
for value in values:
if value is None or value == "":
continue
source_value = _xf_value(mapping, {**criterion, "value": value})
fragments.append(("xf", f"{filter_key}_{_plus(source_value)}"))
if fragments:
return fragments
source_value = _xf_value(mapping, criterion)
return [("xf", f"{filter_key}_{_plus(source_value)}")]
def _xf_value(mapping: dict[str, Any], criterion: dict[str, Any]) -> str:
looked_up = _lookup_option(mapping, criterion.get("value"))
if looked_up is not None:
return looked_up
options = (mapping.get("encoding") or {}).get("options") or {}
value = criterion.get("value")
if options and value is not None and value != "":
return str(value)
return str(mapping.get("source_value") or _threshold_value(mapping, criterion))