From f1ceda3733d54b4420f5fb8c1c288459488341e4 Mon Sep 17 00:00:00 2001 From: Matt Snider Date: Sun, 24 Mar 2019 12:55:10 +0100 Subject: [PATCH] Disallow invalid priorities during interactive prompt --- todoist_taskwarrior/cli.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/todoist_taskwarrior/cli.py b/todoist_taskwarrior/cli.py index ff1420d..f76c233 100644 --- a/todoist_taskwarrior/cli.py +++ b/todoist_taskwarrior/cli.py @@ -162,8 +162,7 @@ def task_prompt(**task_data): 'Set priority', default='', show_default=False, - type=click.Choice([None, 'L', 'M', 'H']), - value_proc=lambda x: None if '' else x, + type=click.Choice(['L', 'M', 'H', '']), ), },