Skip to content

Commit

Permalink
Fix back-updating from caldav -> tw
Browse files Browse the repository at this point in the history
t add kalimera  # id: 1
tw_caldav_sync ...
t mod 1  kalimera2
tw_caldav_sync
\# on subsequent syncs, the item 'kalimera2' would update caldav->tw
because the description field was set in the former to "" and was unset
in the latter.

We're also not accounting the SYNCALL_TW_UUID in the identical keys to
compare since that exists in the caldav version but not in the TW one.
  • Loading branch information
bergercookie committed Aug 17, 2024
1 parent 3778451 commit 021095d
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 111 deletions.
132 changes: 23 additions & 109 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ identify = "^2.6.0"
isort = "^5.13.2"
mock = "*"
mypy = "*"
pdbpp = "^0.10.3"
pre-commit = "^2.21.0"
pyfakefs = [
{ version = "^4.7.0", python = "<3.12" },
Expand Down
1 change: 0 additions & 1 deletion syncall/caldav/caldav_side.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class CaldavSide(SyncSide):
"status",
"summary",
"due",
SYNCALL_TW_UUID,
SYNCALL_TW_WAITING,
)

Expand Down
1 change: 1 addition & 0 deletions syncall/tw_caldav_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ def convert_tw_to_caldav(tw_item: Item) -> Item:

caldav_item["summary"] = tw_item["description"]
# description
caldav_item["description"] = ""
if "annotations" in tw_item.keys():
caldav_item["description"] = "\n".join(tw_item["annotations"])

Expand Down

0 comments on commit 021095d

Please sign in to comment.