From 7ee7aa8ace000a88035c00a0de7842dbbf83d293 Mon Sep 17 00:00:00 2001 From: Dhanush Kovi <99819848+dkvc@users.noreply.github.com> Date: Sat, 18 Feb 2023 08:20:38 +0000 Subject: [PATCH] fix: Set default color to toggl's default 1 (#302) Fixes `ERROR: Toggl's API server returned 400 code with message: "color needs to be integer"` while adding new project without `--color` argument. --- toggl/cli/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toggl/cli/commands.py b/toggl/cli/commands.py index 952ec28..0356cc5 100644 --- a/toggl/cli/commands.py +++ b/toggl/cli/commands.py @@ -656,7 +656,7 @@ def projects(ctx, workspace): help='Specifies whether the estimated hours should be automatically calculated based on task estimations ' '(Premium only)') @click.option('--rate', '-r', type=click.FLOAT, help='Hourly rate of the project (Premium only)') -@click.option('--color', type=click.INT, help='ID of color used for the project') +@click.option('--color', type=click.INT, default=1, help='ID of color used for the project') @click.pass_context def projects_add(ctx, public=None, **kwargs): """