mirror of
https://github.com/hansjone/netx.git
synced 2026-10-18 17:20:44 +08:00
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:
parent
35a3980dc0
commit
961d523479
7 changed files with 89 additions and 30 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue