File tree 1 file changed +5
-2
lines changed
services/web/server/src/simcore_service_webserver
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 15
15
16
16
import logging
17
17
import os
18
+ from typing import Final
18
19
19
20
import typer
20
21
from aiohttp import web
@@ -82,20 +83,22 @@ async def app_factory() -> web.Application:
82
83
create_settings_command (settings_cls = ApplicationSettings , logger = _logger )
83
84
)
84
85
86
+ _NO_TRIAL_DAYS : Final [int ] = - 1
87
+
85
88
86
89
@main .command ()
87
90
def invitations (
88
91
base_url : str ,
89
92
issuer_email : str ,
90
- trial_days : Annotated [int | None , typer .Argument ()] = None ,
93
+ trial_days : Annotated [int , typer .Argument ()] = _NO_TRIAL_DAYS ,
91
94
user_id : int = 1 ,
92
95
num_codes : int = 15 ,
93
96
code_length : int = 30 ,
94
97
):
95
98
login_cli .invitations (
96
99
base_url = base_url ,
97
100
issuer_email = issuer_email ,
98
- trial_days = trial_days ,
101
+ trial_days = trial_days if trial_days != _NO_TRIAL_DAYS else None ,
99
102
user_id = user_id ,
100
103
num_codes = num_codes ,
101
104
code_length = code_length ,
You can’t perform that action at this time.
0 commit comments