1
0
Fork 0
mirror of https://github.com/Kozea/Radicale.git synced 2025-06-26 16:45:52 +00:00

Merge pull request #1764 from pbiering/check-fix-1758

Fix for 1758
This commit is contained in:
Peter Bieringer 2025-04-21 22:28:18 +02:00 committed by GitHub
commit 7dda907582
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 6 deletions

View file

@ -1,7 +1,8 @@
# Changelog # Changelog
## 3.5.2.dev ## 3.5.2.dev
* Adjust: [auth] ldap: use _ldap_user_attr either first element of list or directly * Adjust: [auth] ldap: use ldap_user_attr either first element of list or directly
* Fix: use value of property for time range filter
## 3.5.1 ## 3.5.1
@ -10,7 +11,7 @@
* Extend: [storage] hook supports now placeholder for "cwd" and "path" (and catches unsupported placeholders) * Extend: [storage] hook supports now placeholder for "cwd" and "path" (and catches unsupported placeholders)
* Fix: location of lock file for in case of dedicated cache folder is activated * Fix: location of lock file for in case of dedicated cache folder is activated
* Extend: log and create base folders if not existing during startup * Extend: log and create base folders if not existing during startup
* Adjust: [auth] ldap: use _ldap_user_attr as string * Adjust: [auth] ldap: use ldap_user_attr as string
## 3.5.0 ## 3.5.0

View file

@ -3,7 +3,8 @@
# Copyright © 2008 Pascal Halter # Copyright © 2008 Pascal Halter
# Copyright © 2008-2015 Guillaume Ayoub # Copyright © 2008-2015 Guillaume Ayoub
# Copyright © 2017-2021 Unrud <unrud@outlook.com> # Copyright © 2017-2021 Unrud <unrud@outlook.com>
# Copyright © 2024-2024 Peter Bieringer <pb@bieringer.de> # Copyright © 2023-2024 Ray <ray@react0r.com>
# Copyright © 2024-2025 Peter Bieringer <pb@bieringer.de>
# #
# This library is free software: you can redistribute it and/or modify # This library is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
@ -475,9 +476,9 @@ def visit_time_ranges(vobject_item: vobject.base.Component, child_name: str,
else: else:
# Match a property # Match a property
child = getattr(vobject_item, child_name.lower()) child = getattr(vobject_item, child_name.lower())
if isinstance(child, date): if isinstance(child.value, date):
child_is_datetime = isinstance(child, datetime) child_is_datetime = isinstance(child.value, datetime)
child = date_to_datetime(child) child = date_to_datetime(child.value)
if child_is_datetime: if child_is_datetime:
range_fn(child, child + SECOND, False) range_fn(child, child + SECOND, False)
else: else:

View file

@ -1304,6 +1304,17 @@ permissions: RrWw""")
</C:comp-filter>"""], "todo", items=range(1, 9)) </C:comp-filter>"""], "todo", items=range(1, 9))
assert "/calendar.ics/todo7.ics" in answer assert "/calendar.ics/todo7.ics" in answer
def test_time_range_filter_todos_completed(self) -> None:
answer = self._test_filter(["""\
<C:comp-filter name="VCALENDAR">
<C:comp-filter name="VTODO">
<C:prop-filter name="COMPLETED">
<C:time-range start="20130918T000000Z" end="20130922T000000Z"/>
</C:prop-filter>
</C:comp-filter>
</C:comp-filter>"""], "todo", items=range(1, 9))
assert "/calendar.ics/todo6.ics" in answer
def test_time_range_filter_todos_rrule(self) -> None: def test_time_range_filter_todos_rrule(self) -> None:
"""Report request with time-range filter on todos with rrules.""" """Report request with time-range filter on todos with rrules."""
answer = self._test_filter(["""\ answer = self._test_filter(["""\