From: Michael Tremer Date: Sat, 25 Feb 2023 12:17:04 +0000 (+0000) Subject: TUI: Ignore the default value if it does not exist X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ed1b4bf1cdff8c9de954bd8a1500830279c08fe9;p=people%2Fms%2Fbricklayer.git TUI: Ignore the default value if it does not exist Signed-off-by: Michael Tremer --- diff --git a/src/python/tui.py b/src/python/tui.py index 3bb91aa..1b635a8 100644 --- a/src/python/tui.py +++ b/src/python/tui.py @@ -309,6 +309,10 @@ class SelectWindow(ButtonsWindow): super().__init__(tui, title, text, buttons=buttons, height=height, width=width, help=help) + # Reset default it is not part of the items + if not default in items: + default = None + self.items = items self.default = default self.multi = multi