solve bug in vjournal time filter
This commit is contained in:
parent
7981e67d96
commit
38845da762
@ -311,7 +311,6 @@ def _time_range_match(vobject_item, filter_, child_name):
|
|||||||
|
|
||||||
elif child_name == "VJOURNAL":
|
elif child_name == "VJOURNAL":
|
||||||
dtstart = getattr(child, "dstart", None)
|
dtstart = getattr(child, "dstart", None)
|
||||||
|
|
||||||
if dtstart is not None:
|
if dtstart is not None:
|
||||||
dtstart = dtstart.value
|
dtstart = dtstart.value
|
||||||
if not isinstance(dtstart, datetime):
|
if not isinstance(dtstart, datetime):
|
||||||
@ -321,7 +320,6 @@ def _time_range_match(vobject_item, filter_, child_name):
|
|||||||
.replace(tzinfo=timezone.utc))
|
.replace(tzinfo=timezone.utc))
|
||||||
else:
|
else:
|
||||||
dtstart_is_datetime = True
|
dtstart_is_datetime = True
|
||||||
|
|
||||||
if dtstart_is_datetime:
|
if dtstart_is_datetime:
|
||||||
# Line 1
|
# Line 1
|
||||||
return start <= dtstart and end > dtstart
|
return start <= dtstart and end > dtstart
|
||||||
|
Loading…
Reference in New Issue
Block a user