Open topcats opened 3 years ago
The previous line is:
body = cloud_data.get(cc('body'), {})
So if there's no body in the json, then body should be an empty dict.
I don't understand right now how body
ends up being None...
Nontheless maybe we should protect like this:
body = cloud_data.get(cc('body'), {})
body = body or {} # <= protect agains body being None
self.__body = body.get(cc('content'), '')
self.body_type = body.get(cc('contentType'), 'HTML') # default to HTML for new messages
looks like a good fix I have no idea what other 'standard' fields might be returned invalid/different
I’ll commit soon this fix
I have come across a problem when using a shared maibox calendar.
it was working fine, then the user added a 'private event'
The private event only emails very limited information (generally date and time only) to other users.
This then causes an issue when trying to read 'body' as it does not exist in the json
I'm not sure which other 'standard' loaded values are missing from the json, i have not got past this yet.