fix(ui): Plan-Navigation nicht mehr durch leere data_slices blockieren
Test Suite / lint-backend (push) Waiting to run
Test Suite / compose-smoke (push) Waiting to run
Test Suite / k6 /api/health Baseline (push) Blocked by required conditions
Test Suite / playwright-smoke (push) Blocked by required conditions
Deploy Development / deploy (push) Successful in 44s
Test Suite / pytest-backend (push) Has been cancelled
Test Suite / lint-backend (push) Waiting to run
Test Suite / compose-smoke (push) Waiting to run
Test Suite / k6 /api/health Baseline (push) Blocked by required conditions
Test Suite / playwright-smoke (push) Blocked by required conditions
Deploy Development / deploy (push) Successful in 44s
Test Suite / pytest-backend (push) Has been cancelled
Archetyp-UI-Profil und Methoden-Schnittmenge werden korrekt gemerged; Frontend faellt bei leerem data_slices auf ui_profile.dataSlices zurueck, damit Eingang/Sprint/Gates erreichbar bleiben.
This commit is contained in:
1 parent
fe1edb84f8
commit
11b7128204
5 files changed
+77
-8
No files matched your search
@@ -47,16 +47,29 @@ def _load_ui_profile_from_db(archetype_key: str) -> Optional[dict[str, Any]]:
|
||||
conn.close()
|
||||
|
||||
|
||||
def _resolve_ui_profile(archetype_key: str) -> dict[str, Any]:
|
||||
db_profile = _load_ui_profile_from_db(archetype_key)
|
||||
if db_profile:
|
||||
return db_profile
|
||||
def _seed_ui_profile(archetype_key: str) -> dict[str, Any]:
|
||||
seed_profile = get_ui_profile_json(archetype_key)
|
||||
if seed_profile:
|
||||
return seed_profile
|
||||
return resolve_ui_profile(archetype_key)
|
||||
|
||||
|
||||
def _resolve_ui_profile(archetype_key: str) -> dict[str, Any]:
|
||||
seed_profile = _seed_ui_profile(archetype_key)
|
||||
db_profile = _load_ui_profile_from_db(archetype_key)
|
||||
if not db_profile:
|
||||
return seed_profile
|
||||
|
||||
merged = {**seed_profile, **db_profile}
|
||||
if not (merged.get("omCapabilities") or merged.get("dataSlices")):
|
||||
seed_slices = seed_profile.get("dataSlices") or []
|
||||
merged["dataSlices"] = list(seed_slices)
|
||||
merged["omCapabilities"] = list(
|
||||
seed_profile.get("omCapabilities") or seed_slices
|
||||
)
|
||||
return merged
|
||||
|
||||
|
||||
def _resolve_om_capabilities(ui_profile: dict[str, Any]) -> frozenset[str]:
|
||||
caps = ui_profile.get("omCapabilities") or ui_profile.get("dataSlices") or []
|
||||
return frozenset(caps)
|
||||
|
||||
Reference in new issue
Block a user