Skip invalid personal CLI index rows (#1571)
This commit is contained in:
@@ -42,8 +42,12 @@ def _manager() -> PersonalDocsManager:
|
||||
return _mgr
|
||||
|
||||
|
||||
def _file_rows(files):
|
||||
return [f for f in files or [] if isinstance(f, dict)]
|
||||
|
||||
|
||||
def cmd_list(args):
|
||||
files = getattr(_manager(), "index", []) or []
|
||||
files = _file_rows(getattr(_manager(), "index", []) or [])
|
||||
out = [
|
||||
{"name": f.get("name"), "size": f.get("size"), "path": f.get("path", "")}
|
||||
for f in files
|
||||
|
||||
Reference in New Issue
Block a user