Skip to content

Commit 058cebb

Browse files
paul-rid7415
authored andcommittedFeb 13, 2025··
ui:Set default value to timedelta arg in add_alarm()
Fixes #1338: Adding an alarm in ikhal causes a crash > When adding an alarm in ikhal to an existing or new event the program crashes. > `TypeError: AlarmsEditor.add_alarm() missing 1 required positional argument: 'timedelta'`
1 parent 573e4ed commit 058cebb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎khal/ui/widgets.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ def clear(self) -> None:
562562
"""clear the alarm list"""
563563
self.pile.contents.clear()
564564

565-
def add_alarm(self, button, timedelta: Optional[dt.timedelta]):
565+
def add_alarm(self, button, timedelta: Optional[dt.timedelta] = None):
566566
if timedelta is None:
567567
timedelta = dt.timedelta(0)
568568
self.pile.contents.insert(

0 commit comments

Comments
 (0)
Please sign in to comment.