Skip to content

Commit

Permalink
doesn't add empty CATEGORIES if field empty in interactive mode
Browse files Browse the repository at this point in the history
  • Loading branch information
titibandit authored and WhyNotHugo committed Oct 19, 2023
1 parent 9013750 commit 0395b57
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions khal/khalendar/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0395b57

Please sign in to comment.