Skip to content

Commit 00048e4

Browse files
fix invitations command optional argument
1 parent 248e192 commit 00048e4

File tree

1 file changed

+5
-2
lines changed
  • services/web/server/src/simcore_service_webserver

1 file changed

+5
-2
lines changed

services/web/server/src/simcore_service_webserver/cli.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
import logging
1717
import os
18+
from typing import Final
1819

1920
import typer
2021
from aiohttp import web
@@ -82,20 +83,22 @@ async def app_factory() -> web.Application:
8283
create_settings_command(settings_cls=ApplicationSettings, logger=_logger)
8384
)
8485

86+
_NO_TRIAL_DAYS: Final[int] = -1
87+
8588

8689
@main.command()
8790
def invitations(
8891
base_url: str,
8992
issuer_email: str,
90-
trial_days: Annotated[int | None, typer.Argument()] = None,
93+
trial_days: Annotated[int, typer.Argument()] = _NO_TRIAL_DAYS,
9194
user_id: int = 1,
9295
num_codes: int = 15,
9396
code_length: int = 30,
9497
):
9598
login_cli.invitations(
9699
base_url=base_url,
97100
issuer_email=issuer_email,
98-
trial_days=trial_days,
101+
trial_days=trial_days if trial_days != _NO_TRIAL_DAYS else None,
99102
user_id=user_id,
100103
num_codes=num_codes,
101104
code_length=code_length,

0 commit comments

Comments
 (0)