diff --git a/web/api.py b/web/api.py index b6fc146..86a0a83 100644 --- a/web/api.py +++ b/web/api.py @@ -233,6 +233,7 @@ class ProjectPatch(BaseModel): execution_mode: str | None = None autocommit_enabled: bool | None = None auto_test_enabled: bool | None = None + worktrees_enabled: bool | None = None obsidian_vault_path: str | None = None deploy_command: str | None = None deploy_host: str | None = None @@ -251,7 +252,7 @@ class ProjectPatch(BaseModel): def patch_project(project_id: str, body: ProjectPatch): has_any = any([ body.execution_mode, body.autocommit_enabled is not None, - body.auto_test_enabled is not None, + body.auto_test_enabled is not None, body.worktrees_enabled is not None, body.obsidian_vault_path, body.deploy_command is not None, body.deploy_host is not None, body.deploy_path is not None, body.deploy_runtime is not None, body.deploy_restart_cmd is not None, @@ -280,6 +281,8 @@ def patch_project(project_id: str, body: ProjectPatch): fields["autocommit_enabled"] = int(body.autocommit_enabled) if body.auto_test_enabled is not None: fields["auto_test_enabled"] = int(body.auto_test_enabled) + if body.worktrees_enabled is not None: + fields["worktrees_enabled"] = int(body.worktrees_enabled) if body.obsidian_vault_path is not None: fields["obsidian_vault_path"] = body.obsidian_vault_path if body.deploy_command is not None: