-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix adding/updating todo items with due date in CalDAV integration #105435
Fix adding/updating todo items with due date in CalDAV integration #105435
Conversation
Using `set_due` automatically handles converting the Python-native date/datetime values to the correct representation required by RFC5545.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the fix, appreciate it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good, but there are some mypy/ruff errors when running on CI. Can you take a look?
To make ruff happy.
0304b35
to
85ba36a
Compare
For some reason the mypy pre-commit hook on my side complains, when the |
Perhaps its a different in local mypy version compared to the one running in CI? Anyway, thanks. |
Probably something like that. I only set up the dev env quickly yesterday. |
Proposed change
Fixes #105246.
Before the due_datetime was manually converted to a caldav-compatible date string, when adding or updating a todo. However the method to save a new todo expects a python-native date/datetime.
Additionally, when updating an existing todo, there is a helper method to convert the date/datetime to the appropriate date string.
Tested adding and updating against Nextcloud/SabreDAV.
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.To help with the load of incoming pull requests: