Harden topology tree against bad view filters and allow deleting UME World.

Coerce non-dict filter JSON so /tree no longer 500s, surface API failure details, and let users remove the UME World container for local resets.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-08-07 09:58:20 +08:00
parent 35a3980dc0
commit 961d523479
7 changed files with 89 additions and 30 deletions

View file

@ -29,7 +29,9 @@ WORLD_FLAT_FILTER = {"world_flat": True}
def _filt(view: TopoView | None) -> dict[str, Any]:
if view is None:
return {}
return dict(view.filter or {})
from .topology_common import view_filter_dict
return view_filter_dict(getattr(view, "filter", None))
def is_ume_level_view(view: TopoView | None) -> bool: