Skip to content

Commit 375c2c2

Browse files
committed
fix issue with unicode article id
1 parent 7e3d726 commit 375c2c2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

dataikuapi/dss/wiki.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def get(self):
8383
Returns:
8484
the article definition with payload (article content)
8585
"""
86-
return self.client._perform_json("GET", "/projects/%s/wiki/%s" % (self.project_key, urllib.quote(self.article_id)))
86+
return self.client._perform_json("GET", "/projects/%s/wiki/%s" % (self.project_key, urllib.quote_plus(self.article_id.encode('utf-8'))))
8787

8888
def set(self, article_with_payload):
8989
"""
@@ -95,13 +95,13 @@ def set(self, article_with_payload):
9595
Returns:
9696
the updated article
9797
"""
98-
return self.client._perform_json("PUT", "/projects/%s/wiki/%s" % (self.project_key, urllib.quote(self.article_id)), body=article_with_payload)
98+
return self.client._perform_json("PUT", "/projects/%s/wiki/%s" % (self.project_key, urllib.quote_plus(self.article_id.encode('utf-8'))), body=article_with_payload)
9999

100100
def delete(self):
101101
"""
102102
Delete the article
103103
"""
104-
self.client._perform_empty("DELETE", "/projects/%s/wiki/%s" % (self.project_key, urllib.quote(self.article_id)))
104+
self.client._perform_empty("DELETE", "/projects/%s/wiki/%s" % (self.project_key, urllib.quote_plus(self.article_id.encode('utf-8'))))
105105

106106
########################################################
107107
# Discussions

0 commit comments

Comments
 (0)