fix(board): путь ресурса брать из href (UID из писем не совпадает с именем файла → 'Task not found')
- _fetch_items: сохраняет href ресурса из ответа CalDAV REPORT - _resource_url/_lookup_urls: href → <uid>.ics → <uid без @суффикса>.ics; найденный URL запоминается в _RESOLVED и используется для PUT с If-Match - get_task/_load_for_update: перебор кандидатов вместо одного URL - entities: UID пишется без суффикса @email-assistant (совпадает с именем файла) - тесты: разворот складок, кандидаты URL — 18/18
This commit is contained in:
+2
-2
@@ -166,7 +166,7 @@ def _vtodo_ics(uid: str, summary: str, description: str, due_dt: str | None = No
|
||||
now = datetime.now().strftime("%Y%m%dT%H%M%S")
|
||||
lines = [
|
||||
"BEGIN:VCALENDAR", "VERSION:2.0", "PRODID:-//email-assistant//VTODO//RU",
|
||||
"BEGIN:VTODO", f"UID:{uid}@email-assistant", f"DTSTAMP:{now}",
|
||||
"BEGIN:VTODO", f"UID:{uid}", f"DTSTAMP:{now}",
|
||||
f"SUMMARY:{ics_escape(summary)}", f"DESCRIPTION:{ics_escape(description)}",
|
||||
]
|
||||
if due_dt:
|
||||
@@ -185,7 +185,7 @@ def _vevent_ics(uid: str, summary: str, description: str, start_dt: str,
|
||||
end = start + timedelta(minutes=duration_min)
|
||||
lines = [
|
||||
"BEGIN:VCALENDAR", "VERSION:2.0", "PRODID:-//email-assistant//VEVENT//RU",
|
||||
"BEGIN:VEVENT", f"UID:{uid}@email-assistant", f"DTSTAMP:{now}",
|
||||
"BEGIN:VEVENT", f"UID:{uid}", f"DTSTAMP:{now}",
|
||||
f"SUMMARY:{ics_escape(summary)}", f"DESCRIPTION:{ics_escape(description)}",
|
||||
f"DTSTART:{start.strftime('%Y%m%dT%H%M%S')}",
|
||||
f"DTEND:{end.strftime('%Y%m%dT%H%M%S')}",
|
||||
|
||||
Reference in New Issue
Block a user