Commit c0f06d8
Fix add_object/add_event/add_todo for async clients (issue #631)
When using AsyncDAVClient, CalendarObjectResource.save() returns a
coroutine. Collection.add_object() was calling o.save() and then
immediately accessing o.url, crashing with AttributeError because
o was a coroutine, not the saved object.
Fix by routing through _async_add_object_finish() when is_async_client,
which awaits save() before checking o.url and calling _handle_reverse_relations().
Fixes #631
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 4d588c9 commit c0f06d8
1 file changed
Lines changed: 9 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
840 | 840 | | |
841 | 841 | | |
842 | 842 | | |
| 843 | + | |
| 844 | + | |
843 | 845 | | |
844 | 846 | | |
845 | 847 | | |
| |||
848 | 850 | | |
849 | 851 | | |
850 | 852 | | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
851 | 860 | | |
852 | 861 | | |
853 | 862 | | |
| |||
0 commit comments