Commit dfbda20
fix: VTODO with only COMPLETED must not crash on time-range check
When a VTODO has COMPLETED but no DTSTART, DUE, or CREATED, the VTODO
branch set comp_end from COMPLETED but left comp_start=None. The
existing 'if comp_end and not comp_start' guard runs before COMPLETED is
checked, so it did not fire. Add a second guard after the
CREATED/COMPLETED block to mirror comp_start = comp_end in that case.
Test parametrized over with/without RRULE, as an RRULE-only VTODO
without DTSTART (valid per RFC 5545 §3.6.2) hit a separate KeyError in
xandikos when attempting server-side RRULE expansion.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent ce4ebe9 commit dfbda20
2 files changed
Lines changed: 30 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
110 | 113 | | |
111 | 114 | | |
112 | 115 | | |
| |||
159 | 162 | | |
160 | 163 | | |
161 | 164 | | |
162 | | - | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
163 | 168 | | |
164 | 169 | | |
165 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
0 commit comments