Skip to content

Commit 7e3d726

Browse files
committed
fix issue with # in article it
1 parent cd850d2 commit 7e3d726

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

dataikuapi/dss/wiki.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from .discussion import DSSObjectDiscussions
22
import json
3+
import urllib
34

45
class DSSWiki(object):
56
"""
@@ -82,7 +83,7 @@ def get(self):
8283
Returns:
8384
the article definition with payload (article content)
8485
"""
85-
return self.client._perform_json("GET", "/projects/%s/wiki/%s" % (self.project_key, self.article_id))
86+
return self.client._perform_json("GET", "/projects/%s/wiki/%s" % (self.project_key, urllib.quote(self.article_id)))
8687

8788
def set(self, article_with_payload):
8889
"""
@@ -94,13 +95,13 @@ def set(self, article_with_payload):
9495
Returns:
9596
the updated article
9697
"""
97-
return self.client._perform_json("PUT", "/projects/%s/wiki/%s" % (self.project_key, self.article_id), body=article_with_payload)
98+
return self.client._perform_json("PUT", "/projects/%s/wiki/%s" % (self.project_key, urllib.quote(self.article_id)), body=article_with_payload)
9899

99100
def delete(self):
100101
"""
101102
Delete the article
102103
"""
103-
self.client._perform_empty("DELETE", "/projects/%s/wiki/%s" % (self.project_key, self.article_id))
104+
self.client._perform_empty("DELETE", "/projects/%s/wiki/%s" % (self.project_key, urllib.quote(self.article_id)))
104105

105106
########################################################
106107
# Discussions

0 commit comments

Comments
 (0)