Skip to content

Commit

Permalink
fix caldav sync issue
Browse files Browse the repository at this point in the history
  • Loading branch information
mrvladus committed May 26, 2024
1 parent f814423 commit a0f7f9a
Showing 1 changed file with 22 additions and 20 deletions.
42 changes: 22 additions & 20 deletions errands/lib/sync/providers/caldav.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,26 +450,28 @@ def __create_remote_task(self, calendar: Calendar, task: TaskData) -> None:

try:
new_todo = calendar.save_todo(
categories=",".join(task.tags) if task.tags else None,
description=task.notes,
dtstart=(
datetime.datetime.fromisoformat(task.start_date)
if task.start_date
else None
),
due=(
datetime.datetime.fromisoformat(task.due_date)
if task.due_date
else None
),
priority=task.priority,
percent_complete=task.percent_complete,
related_to=task.parent,
summary=task.text,
uid=task.uid,
x_errands_color=task.color,
x_errands_expanded=int(task.expanded),
x_errands_toolbar_shown=int(task.toolbar_shown),
**{
"categories": ",".join(task.tags) if task.tags else None,
"description": task.notes,
"dtstart": (
datetime.datetime.fromisoformat(task.start_date)
if task.start_date
else None
),
"due": (
datetime.datetime.fromisoformat(task.due_date)
if task.due_date
else None
),
"priority": task.priority,
"percent-complete": task.percent_complete,
"related-to": task.parent,
"summary": task.text,
"uid": task.uid,
"x-errands-color": task.color,
"x-errands-expanded": int(task.expanded),
"x-errands-toolbar-shown": int(task.toolbar_shown),
}
)
if task.completed:
new_todo.complete()
Expand Down

0 comments on commit a0f7f9a

Please sign in to comment.