From 5d493d46eaa81fce8a90f155bc330677c6368850 Mon Sep 17 00:00:00 2001 From: Ross Jones Date: Mon, 7 Mar 2022 17:41:49 +0000 Subject: [PATCH] Accept y, Y, yes, Yes, YES when confirming app deletion Currently it only accepts Y, this small change should allow it to accept multiple options (because case is ignored). --- controlpanel/cli/management/commands/deleteapp.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/controlpanel/cli/management/commands/deleteapp.py b/controlpanel/cli/management/commands/deleteapp.py index 0471ea02b..96c93ad25 100644 --- a/controlpanel/cli/management/commands/deleteapp.py +++ b/controlpanel/cli/management/commands/deleteapp.py @@ -28,8 +28,7 @@ def handle(self, *args, **options): do_delete = options["yes"] if not options["yes"]: confirm = input(f"Are you sure you want to delete {app.name}? Y/n\n") - if confirm in ("Y", "yes"): - do_delete = True + do_delete = confirm.lower() in ("y", "yes") if do_delete: self.stdout.write(f"Deleting {app.name}")