diff --git a/khal/khalendar/event.py b/khal/khalendar/event.py index 7c3a0bbf2..d6674383d 100644 --- a/khal/khalendar/event.py +++ b/khal/khalendar/event.py @@ -524,8 +524,9 @@ def categories(self) -> str: def update_categories(self, categories: List[str]) -> None: assert isinstance(categories, list) + categories = [c.strip().lower() for c in categories if c != ""] self._vevents[self.ref].pop('CATEGORIES', False) - if categories: + if len(categories) > 0: self._vevents[self.ref].add('CATEGORIES', categories) @property