소스 검색

Return empty REPORT response if no items found

Georgiy 7 달 전
부모
커밋
40217a1360
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 5 3
      radicale/app/report.py

+ 5 - 3
radicale/app/report.py

@@ -349,9 +349,11 @@ def xml_report(base_prefix: str, path: str, xml_request: Optional[ET.Element],
         assert item.href
         uri = pathutils.unstrip_path(
             posixpath.join(collection.path, item.href))
-        multistatus.append(xml_item_response(
-            base_prefix, uri, found_props=found_props,
-            not_found_props=not_found_props, found_item=True))
+
+        if found_props or not_found_props:
+            multistatus.append(xml_item_response(
+                base_prefix, uri, found_props=found_props,
+                not_found_props=not_found_props, found_item=True))
 
     return client.MULTI_STATUS, multistatus