From 965ca91d4e0c7f93303bde33b262f51d39f36ace Mon Sep 17 00:00:00 2001 From: star7js <126814341+star7js@users.noreply.github.com> Date: Thu, 26 Mar 2026 17:10:47 -0600 Subject: [PATCH] Fix add_comment_to_object sending data as query params instead of POST body (closes #1596) The Insight/Assets comment create endpoint expects JSON in the request body, not query string parameters. Using params= causes a 500 error. --- atlassian/assets.py | 2 +- atlassian/insight.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/atlassian/assets.py b/atlassian/assets.py index 46aea298b..506fb8160 100644 --- a/atlassian/assets.py +++ b/atlassian/assets.py @@ -174,7 +174,7 @@ def add_comment_to_object(self, comment, object_id, role): raise NotImplementedError params = {"comment": comment, "objectId": object_id, "role": role} url = "rest/assets/1.0/comment/create" - return self.post(url, params=params) + return self.post(url, data=params) def get_comment_of_object(self, object_id): """ diff --git a/atlassian/insight.py b/atlassian/insight.py index 23946ad9f..32724d30c 100644 --- a/atlassian/insight.py +++ b/atlassian/insight.py @@ -173,7 +173,7 @@ def add_comment_to_object(self, comment, object_id, role): raise NotImplementedError params = {"comment": comment, "objectId": object_id, "role": role} url = "rest/insight/1.0/comment/create" - return self.post(url, params=params) + return self.post(url, data=params) def get_comment_of_object(self, object_id): """