Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double quote (") in item name will fail to create the item #41

Open
rvdrijst opened this issue Oct 28, 2021 · 0 comments
Open

Double quote (") in item name will fail to create the item #41

rvdrijst opened this issue Oct 28, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@rvdrijst
Copy link

rvdrijst commented Oct 28, 2021

When creating an item through the API, the item name is specified as a separate argument:

MondayClient(<key>).items.create_item(
            board_id=<board_id>,
            group_id=<group_id>,
            item_name='"A" name,
            column_values={"key": '"A" value'},
)

However, the "s are not escaped and will therefore generate a faulty query:

mutation
    {
        create_item (
            board_id: 1234,
            group_id: "4321",
            item_name: ""A" name",  #<-- this is the problem
            column_values: "{\\"key\\": \\"\\\\\\"A\\\\\\" value\\"}",
            create_labels_if_missing: false
        ) {
            id
        }
    }

I've worked around this for now by doing a value.replace('"', '\\"') before passing it to the api, but it would be nice if this library took care of it automatically.

For updating I'm only using change_multiple_column_values where the item name is in the dictionary, so no problems there, but there are probably other places where unescaped quotes are an issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants