From 0395b57d2fd865b96d062640783b88d691e0db29 Mon Sep 17 00:00:00 2001 From: Thibaut Meyer Date: Wed, 18 Oct 2023 09:51:07 +0200 Subject: [PATCH] doesn't add empty CATEGORIES if field empty in interactive mode --- khal/khalendar/event.py | 1 + 1 file changed, 1 insertion(+) diff --git a/khal/khalendar/event.py b/khal/khalendar/event.py index 7c3a0bbf2c..526fb1392a 100644 --- a/khal/khalendar/event.py +++ b/khal/khalendar/event.py @@ -524,6 +524,7 @@ def categories(self) -> str: def update_categories(self, categories: List[str]) -> None: assert isinstance(categories, list) + categories = [c.strip() for c in categories if c != ""] self._vevents[self.ref].pop('CATEGORIES', False) if categories: self._vevents[self.ref].add('CATEGORIES', categories)