Skip to content

Commit

Permalink
Merge pull request #1008 from ministryofjustice/accept-lowercase-y
Browse files Browse the repository at this point in the history
Accept y, Y, yes, Yes, YES when confirming app deletion
  • Loading branch information
rossjones authored Mar 7, 2022
2 parents 5305d85 + 5d493d4 commit a8c46b1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions controlpanel/cli/management/commands/deleteapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down

0 comments on commit a8c46b1

Please sign in to comment.