Skip to content

Commit e4279a0

Browse files
author
kili-technology
authored
Merge pull request #9 from kili-technology/feature/add-jsonresponse-in-update-properties-in-label
Add jsonresponse in update properties in label
2 parents a4f9825 + 03e1d99 commit e4279a0

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

kili/mutations/label.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,19 +76,22 @@ def update_label(client, label_id, label_asset_id, review_asset_id, author_id, l
7676
return format_result('updateLabel', result)
7777

7878

79-
def update_properties_in_label(client, label_id, seconds_to_label=None):
79+
def update_properties_in_label(client, label_id, seconds_to_label=None, json_response = None):
8080
formatted_seconds_to_label = 'null' if seconds_to_label is None else f'{seconds_to_label}'
81+
formatted_json_response = 'null' if json_response is None else f'{json_response}'
82+
8183

8284
result = client.execute('''
8385
mutation {
8486
updatePropertiesInLabel(
8587
where: {id: "%s"},
8688
data: {
8789
secondsToLabel: %s
90+
jsonResponse: "%s"
8891
}
8992
) {
9093
id
9194
}
9295
}
93-
''' % (label_id, formatted_seconds_to_label))
96+
''' % (label_id, formatted_seconds_to_label, json_escape(json_response)))
9497
return format_result('updatePropertiesInLabel', result)

0 commit comments

Comments
 (0)