Skip to content

Commit aa2bef5

Browse files
committed
fixes on wiki api
1 parent 5ac2406 commit aa2bef5

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 sys
34

45
if sys.version_info >= (3,0):
56
import urllib.parse
@@ -153,7 +154,7 @@ def __init__(self, client, project_key, article_id):
153154
self.project_key = project_key
154155
self.article_id = article_id
155156
# encode in UTF-8 if its python2 and unicode
156-
if sys.version_info < (3,0) and isinstance(uni, unicode):
157+
if sys.version_info < (3,0) and isinstance(self.article_id, unicode):
157158
self.article_id = self.article_id.encode('utf-8')
158159

159160
def get_data(self):
@@ -234,9 +235,9 @@ def set_metadata(self, metadata):
234235
"""
235236
Set the article metadata
236237
237-
:param dict article: the article metadata
238+
:param dict metadata: the article metadata
238239
"""
239-
self.article_data["article"] = article
240+
self.article_data["article"] = metadata
240241

241242
def save(self):
242243
"""

0 commit comments

Comments
 (0)