Skip to content
Snippets Groups Projects
Commit 2bb37b5d authored by Richard Mathot's avatar Richard Mathot Committed by Jérome Maes
Browse files

[FIX] calendar: don't crash on missing optional dependency

For historical reasons, `vobject`* Python library is not mandatory in
Odoo.

Since refactoring 6af6148a,
get_ics_file() returns now a dictionary whose keys are calendar.event
ids and values are the corresponding ics file.
If `vobject` is not available, it returns an empty dictionary that
could cause calendar.py to crash because it always expects to find the
event's key.

Before this refactoring, this method was called and architectured in a
different manner, so no crash was happening.

This commit prevents the crash if `vobject` is not installed and logs a
warning.

*vobject allows to generate iCalendar files
parent 4dd31f64
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment