Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/flask/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,11 @@ def _validate_key(ctx: click.Context, param: click.Parameter, value: t.Any) -> t
ctx.params["cert"] = cert, value

else:
if cert and not (is_adhoc or is_context):
if (
cert is not None
and cert != click.utils.UNSET
and not (is_adhoc or is_context)
):
raise click.BadParameter('Required when using "--cert".', ctx, param)

return value
Expand Down
Loading