Skip to content

Commit

Permalink
Fix parse error when the specified group id starts with a number
Browse files Browse the repository at this point in the history
A group id may start with a number. Monday API requires such id
to be quoted, otherwise it will return a Parse error.

This patch adds quotes around group_id parameters to avoid such
errors.
  • Loading branch information
lucioseki committed May 18, 2021
1 parent 536087d commit 0eada3f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions monday/query_joins.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def mutate_item_query(board_id, group_id, item_name, column_values):
{
create_item (
board_id: %s,
group_id: %s,
group_id: "%s",
item_name: "%s",
column_values: %s
) {
Expand Down Expand Up @@ -375,7 +375,7 @@ def get_items_by_group_query(board_id, group_id):
query = '''query
{
boards(ids: %s) {
groups(ids: %s) {
groups(ids: "%s") {
id
title
items {
Expand Down Expand Up @@ -404,7 +404,7 @@ def duplicate_group_query(board_id, group_id):
query = '''
mutation
{
duplicate_group(board_id: %s, group_id: %s)
duplicate_group(board_id: %s, group_id: "%s")
{
id
}
Expand All @@ -416,7 +416,7 @@ def archive_group_query(board_id, group_id):
query = '''
mutation
{
archive_group(board_id: %s, group_id: %s)
archive_group(board_id: %s, group_id: "%s")
{
id
archived
Expand All @@ -429,7 +429,7 @@ def delete_group_query(board_id, group_id):
query = '''
mutation
{
delete_group(board_id: %s, group_id: %s)
delete_group(board_id: %s, group_id: "%s")
{
id
deleted
Expand Down

0 comments on commit 0eada3f

Please sign in to comment.