Преглед изворни кода

Don't allow RADICALE:getcontentcount prop for collections

Tests should pass now
MatthewHana пре 1 година
родитељ
комит
ee2fc74bc0
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      radicale/app/propfind.py

+ 1 - 1
radicale/app/propfind.py

@@ -274,7 +274,7 @@ def xml_propfind_response(
                     is404 = True
             elif tag == xmlutils.make_clark("RADICALE:getcontentcount"):
                 # Only for internal use by the web interface
-                if is_collection or is_leaf:
+                if not is_collection or is_leaf:
                     element.text = str(sum(1 for entry in item.get_all()))
                 else:
                     is404 = True