diff --git a/CHANGELOG.md b/CHANGELOG.md index c5163164..c41f019e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ # Changelog ## 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 @@ -10,7 +11,7 @@ * 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 * 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 diff --git a/radicale/item/filter.py b/radicale/item/filter.py index 209bd1cb..47a777db 100644 --- a/radicale/item/filter.py +++ b/radicale/item/filter.py @@ -3,7 +3,8 @@ # Copyright © 2008 Pascal Halter # Copyright © 2008-2015 Guillaume Ayoub # Copyright © 2017-2021 Unrud -# Copyright © 2024-2024 Peter Bieringer +# Copyright © 2023-2024 Ray +# Copyright © 2024-2025 Peter Bieringer # # 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 @@ -475,9 +476,9 @@ def visit_time_ranges(vobject_item: vobject.base.Component, child_name: str, else: # Match a property child = getattr(vobject_item, child_name.lower()) - if isinstance(child, date): - child_is_datetime = isinstance(child, datetime) - child = date_to_datetime(child) + if isinstance(child.value, date): + child_is_datetime = isinstance(child.value, datetime) + child = date_to_datetime(child.value) if child_is_datetime: range_fn(child, child + SECOND, False) else: diff --git a/radicale/tests/test_base.py b/radicale/tests/test_base.py index 63c420e9..75df0592 100644 --- a/radicale/tests/test_base.py +++ b/radicale/tests/test_base.py @@ -1304,6 +1304,17 @@ permissions: RrWw""") """], "todo", items=range(1, 9)) assert "/calendar.ics/todo7.ics" in answer + def test_time_range_filter_todos_completed(self) -> None: + answer = self._test_filter(["""\ + + + + + + +"""], "todo", items=range(1, 9)) + assert "/calendar.ics/todo6.ics" in answer + def test_time_range_filter_todos_rrule(self) -> None: """Report request with time-range filter on todos with rrules.""" answer = self._test_filter(["""\