Skip to content

Commit

Permalink
caldav: Convert CREATED, COMPLETED fields from vtodo item
Browse files Browse the repository at this point in the history
  • Loading branch information
bergercookie committed Dec 31, 2023
1 parent a6db6cf commit f63bfb3
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions syncall/caldav/caldav_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,9 @@ def _convert_one(name: str) -> str:
for name in ["description", "summary"]:
todo_item[name] = _convert_one(name)

for name in ["last-modified"]:
item = vtodo.get(name)
if item:
todo_item[name] = item.dt

if vtodo.get("due"):
todo_item["due"] = vtodo["due"].dt
for date_field in ("due", "created", "completed", "last-modified"):
if vtodo.get(date_field):
todo_item[date_field] = vtodo[date_field].dt

vcategories = vtodo.get("categories")
if vcategories is not None:
Expand Down

0 comments on commit f63bfb3

Please sign in to comment.