[fix bug 1069782] Fix export to ical through api traceback.
Merge pull request #863 from akatsoulas/fix-events-api

[fix bug 1069782] Fix export to ical through api traceback.