Przeglądaj źródła

Merge pull request #1821 from lbt/issue1820

Guard against entries with no vevent_list in the vobject - thank you for this quick fix
Peter Bieringer 7 miesięcy temu
rodzic
commit
72002958cc
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      radicale/app/report.py

+ 2 - 1
radicale/app/report.py

@@ -310,7 +310,8 @@ def xml_report(base_prefix: str, path: str, xml_request: Optional[ET.Element],
                     found_props.append(expanded_element)
                 else:
                     found_props.append(element)
-                    n_vevents += len(item.vobject_item.vevent_list)
+                    if hasattr(item.vobject_item, "vevent_list"):
+                        n_vevents += len(item.vobject_item.vevent_list)
                 # Avoid DoS with too many events
                 if max_occurrence and n_vevents > max_occurrence:
                     raise ValueError("REPORT occurrences limit of {} hit"