generated from coulomb/repo-seed
Assessment run for latest improvements
This commit is contained in:
@@ -1801,7 +1801,7 @@ class ServiceRuntime:
|
||||
for path in sorted(child_folder_paths)
|
||||
if path not in workspace_folders
|
||||
]
|
||||
return sorted(workspace_children + projection_children, key=lambda item: item["path"])
|
||||
return sorted(workspace_children + projection_children, key=_cmis_child_order_key)
|
||||
children: list[dict[str, Any]] = []
|
||||
folder_path = _normalize_cmis_path(folder_path)
|
||||
child_folder_paths: set[str] = set()
|
||||
@@ -1833,7 +1833,7 @@ class ServiceRuntime:
|
||||
for path in sorted(child_folder_paths)
|
||||
if path not in workspace_folders
|
||||
]
|
||||
return projection_children + children
|
||||
return sorted(projection_children + children, key=_cmis_child_order_key)
|
||||
|
||||
def _cmis_workspace_folder_map(self, access_point_id: str) -> dict[str, CMISWorkspaceFolder]:
|
||||
return self.cmis_workspace_folders.setdefault(access_point_id, {})
|
||||
@@ -5050,6 +5050,12 @@ def _path_contains(parent_path: str, candidate_path: str) -> bool:
|
||||
return candidate == parent or candidate.startswith(parent.rstrip("/") + "/")
|
||||
|
||||
|
||||
def _cmis_child_order_key(item: dict[str, Any]) -> tuple[str, str]:
|
||||
properties = dict(item.get("properties", {}))
|
||||
name = properties.get("cmis:name") or item.get("name") or _path_name(str(item.get("path") or ""))
|
||||
return (str(name).casefold(), str(item.get("object_id") or ""))
|
||||
|
||||
|
||||
def _parse_multipart_form(content_type: str, body: bytes) -> tuple[dict[str, list[Any]], dict[str, dict[str, Any]]]:
|
||||
message = BytesParser(policy=policy.default).parsebytes(
|
||||
b"Content-Type: " + content_type.encode("utf-8") + b"\r\nMIME-Version: 1.0\r\n\r\n" + body
|
||||
|
||||
Reference in New Issue
Block a user