fix(webdav): include fileid in find_by_type SEARCH + address PR #765 review
The default property set in `search_files` omits `<oc:fileid>`, so `find_by_type` returned descendant dicts with no `file_id` — which `NextcloudClient.find_files_by_tag` then silently dropped via its dedup-by-id guard. Net effect: tag-on-folder produced zero expanded descendants in CI (single-user / nc31, nc32). Mirrors the explicit property list already used in `WebDAVClient.find_by_tag`. Also addresses three nits from the PR #765 bot review: - trim multi-paragraph docstring on `_normalise_search_result` - trim multi-line docstring on `find_files_by_tag` - match `is not None` ID-extraction pattern in the descendant loop - assert positional `mime_type` arg in the unit test Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
43c6788555
commit
e9e6bcc60a
@@ -905,8 +905,24 @@ class WebDAVClient(BaseNextcloudClient):
|
||||
</d:like>
|
||||
"""
|
||||
|
||||
# fileid is required by callers like NextcloudClient.find_files_by_tag
|
||||
# that dedupe results by id; the default property set in search_files
|
||||
# omits it.
|
||||
properties = [
|
||||
"displayname",
|
||||
"getcontentlength",
|
||||
"getcontenttype",
|
||||
"getlastmodified",
|
||||
"resourcetype",
|
||||
"getetag",
|
||||
"fileid",
|
||||
]
|
||||
|
||||
return await self.search_files(
|
||||
scope=scope, where_conditions=where_conditions, limit=limit
|
||||
scope=scope,
|
||||
where_conditions=where_conditions,
|
||||
properties=properties,
|
||||
limit=limit,
|
||||
)
|
||||
|
||||
async def list_favorites(
|
||||
|
||||
Reference in New Issue
Block a user