Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7d31e48

Browse files
committed
Forgot to add sudo-support to update
1 parent5d25344 commit7d31e48

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

‎gitlab.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ def update(self, obj, **kwargs):
420420
headers=self._createHeaders(content_type="application/json")
421421

422422
# build data that can really be sent to server
423-
data=obj._dataForGitlab()
423+
data=obj._dataForGitlab(extra_parameters=kwargs)
424424

425425
try:
426426
r=requests.put(url,data=data,
@@ -942,9 +942,10 @@ class ProjectIssue(GitlabObject):
942942
def_dataForGitlab(self,extra_parameters={}):
943943
# Gitlab-api returns labels in a json list and takes them in a
944944
# comma separated list.
945-
ifhasattr(self,"labels")andself.labelsisnotNone:
946-
labels=", ".join(self.labels)
947-
extra_parameters.update(labels)
945+
ifhasattr(self,"labels"):
946+
ifself.labelsisnotNoneandnotisinstance(self.labels,six.string_types):
947+
labels=", ".join(self.labels)
948+
extra_parameters['labels']=labels
948949

949950
returnsuper(ProjectIssue,self)._dataForGitlab(extra_parameters)
950951

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp