mirror of
https://github.com/kevinveenbirkenbach/homepage.veen.world.git
synced 2025-09-10 03:37:11 +02:00
Finished implementation of configuration resolver
This commit is contained in:
@@ -49,7 +49,12 @@ class ConfigurationResolver:
|
||||
(item for item in current if isinstance(item, dict) and item.get("name", "").lower() == part),
|
||||
None
|
||||
)
|
||||
if found is None:
|
||||
if found:
|
||||
print(
|
||||
f"Matching entry for '{part}' in list. Path so far: {' > '.join(parts[:parts.index(part)+1])}. "
|
||||
f"Current list: {current}"
|
||||
)
|
||||
else:
|
||||
raise ValueError(
|
||||
f"No matching entry for '{part}' in list. Path so far: {' > '.join(parts[:parts.index(part)+1])}. "
|
||||
f"Current list: {current}"
|
||||
@@ -71,7 +76,7 @@ class ConfigurationResolver:
|
||||
)
|
||||
|
||||
# Navigate into `subitems` if present
|
||||
if isinstance(current, dict) and "subitems" in current:
|
||||
if isinstance(current, dict) and ("subitems" in current and current["subitems"]):
|
||||
current = current["subitems"]
|
||||
|
||||
return current
|
||||
|
Reference in New Issue
Block a user