summaryrefslogtreecommitdiff
path: root/gitlab.py
diff options
context:
space:
mode:
authorMika Mäenpää <mika.j.maenpaa@tut.fi>2014-12-05 13:36:21 +0200
committerMika Mäenpää <mika.j.maenpaa@tut.fi>2014-12-05 13:36:21 +0200
commit7d31e48c7f37514343dc48350ea0e88df3c0e712 (patch)
tree973e60b0b60d12cc7e3d278339841e0913593e57 /gitlab.py
parent5d25344635d69c3c2c9bdc286bf1236c0343eca8 (diff)
downloadgitlab-7d31e48c7f37514343dc48350ea0e88df3c0e712.tar.gz
Forgot to add sudo-support to update
Diffstat (limited to 'gitlab.py')
-rw-r--r--gitlab.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/gitlab.py b/gitlab.py
index 41cacbb..41ee0ab 100644
--- a/gitlab.py
+++ b/gitlab.py
@@ -420,7 +420,7 @@ class Gitlab(object):
headers = self._createHeaders(content_type="application/json")
# build data that can really be sent to server
- data = obj._dataForGitlab()
+ data = obj._dataForGitlab(extra_parameters=kwargs)
try:
r = requests.put(url, data=data,
@@ -942,9 +942,10 @@ class ProjectIssue(GitlabObject):
def _dataForGitlab(self, extra_parameters={}):
# Gitlab-api returns labels in a json list and takes them in a
# comma separated list.
- if hasattr(self, "labels") and self.labels is not None:
- labels = ", ".join(self.labels)
- extra_parameters.update(labels)
+ if hasattr(self, "labels"):
+ if self.labels is not None and not isinstance(self.labels, six.string_types):
+ labels = ", ".join(self.labels)
+ extra_parameters['labels'] = labels
return super(ProjectIssue, self)._dataForGitlab(extra_parameters)