mirror of
https://github.com/Kozea/Radicale.git
synced 2025-10-12 21:41:56 +00:00
Improve free-busy report
This commit is contained in:
parent
4c1d295e81
commit
b0f131cac2
4 changed files with 80 additions and 30 deletions
|
@ -158,24 +158,6 @@ class BaseCollection:
|
|||
continue
|
||||
yield item, simple and (start <= istart or iend <= end)
|
||||
|
||||
def get_by_time(self, start: int , end: int
|
||||
) -> Iterable["radicale_item.Item"]:
|
||||
"""Fetch all items within a start and end time range.
|
||||
|
||||
Returns a iterable of ``item``s.
|
||||
|
||||
"""
|
||||
if not self.tag:
|
||||
return
|
||||
for item in self.get_all():
|
||||
# TODO: Any other component_name here?
|
||||
if item.component_name not in ("VEVENT",):
|
||||
continue
|
||||
istart, iend = item.time_range
|
||||
if istart >= end or iend <= start:
|
||||
continue
|
||||
yield item
|
||||
|
||||
def has_uid(self, uid: str) -> bool:
|
||||
"""Check if a UID exists in the collection."""
|
||||
for item in self.get_all():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue