Skip to content
This repository was archived by the owner on Jun 25, 2024. It is now read-only.
This repository was archived by the owner on Jun 25, 2024. It is now read-only.

workspace update doesn't work #16

@Neodbaryd

Description

@Neodbaryd

Hi,
trying to update multiple workspaces by updating working directories to normalized.

        workspace.update(
            working_directory=normalized,
        )

Error:

TypeError: Object of type object_helper is not JSON serializable

After debugging, the payload send:

{
    "data": {
        "attributes": {
            "name": "xxx",
            "terraform_version": "1.1-latest",
            "working-directory": "xxx",
            "auto-apply": false,
            "queue-all-runs": false,
            "trigger-prefixes": [],
            "vcs-repo": <pyterprise._api_response_object.object_helper object at 0x10bdedf00>
        },
        "type": "workspaces"
    }
}

solving my issue with

        workspace.update(
            working_directory=normalized,
            vcs_repo=workspace.vcs_repo.d,
        )

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions