kuzmoyev / google-calendar-simple-api

Pythonic wrapper for the Google Calendar API
https://google-calendar-simple-api.readthedocs.io
MIT License
568 stars 42 forks source link

Round-trip identity not preserved if event summary is the empty string #190

Closed MartinBernstorff closed 2 weeks ago

MartinBernstorff commented 4 months ago

If I create an event with the empty string as a summary, and then download the newly created event, the new event has a summary of None. This breaks identity, making syncing harder.

Perhaps warn, or return a summary of "" if no summary is set on Google calendar?

MartinBernstorff commented 4 months ago

I'll gladly submit a PR if we agree on returning the empty string 👍

kuzmoyev commented 4 months ago

Hi @MartinBernstorff, thanks for the submission of the issues!

In both cases (here and #189) it is a Google's API behavior unrelated to gcsa (just checked, gcsa passes empty string and microseconds to the API).

The warning log would be great (for both cases). But I wouldn't replace the None in summary for an empty string as it would lead to inconsistencies in case the user passes None as a summary (even though it's against the type annotation of the Event).

PRs are welcome!

MartinBernstorff commented 4 months ago

Excellent! I've submitted a PR, let me know what you think 👍