From b70a622e243505a84e509e9c1292fa759a009291 Mon Sep 17 00:00:00 2001 From: Corban Beaird <25434156+corban-beaird@users.noreply.github.com> Date: Fri, 18 Oct 2024 16:39:54 -0600 Subject: [PATCH] fix: correct token creation CLI to ensure it works with default expiry (#10084) --- harness/determined/cli/token.py | 1 + 1 file changed, 1 insertion(+) diff --git a/harness/determined/cli/token.py b/harness/determined/cli/token.py index 4471ec24ec3..c2cc8f5e570 100644 --- a/harness/determined/cli/token.py +++ b/harness/determined/cli/token.py @@ -85,6 +85,7 @@ def create_token(args: argparse.Namespace) -> None: raise errors.CliError(f"User '{username}' not found or does not have an ID") # convert days into hours Go duration format + expiration_in_hours = None if args.expiration_days: expiration_in_hours = str(24 * args.expiration_days) + "h"