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