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

Commitd7967c6

Browse files
author
Gauvain Pocentek
committed
MR (un)subscribe: don't fail if state doesn't change
1 parent178bfb7 commitd7967c6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

‎gitlab/objects.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1370,7 +1370,8 @@ def subscribe(self, **kwargs):
13701370

13711371
r=self.gitlab._raw_post(url,**kwargs)
13721372
raise_error_from_response(r,GitlabSubscribeError, [201,304])
1373-
self._set_from_dict(r.json())
1373+
ifr.status_code==201:
1374+
self._set_from_dict(r.json())
13741375

13751376
defunsubscribe(self,**kwargs):
13761377
"""Unsubscribe a MR.
@@ -1385,7 +1386,8 @@ def unsubscribe(self, **kwargs):
13851386

13861387
r=self.gitlab._raw_delete(url,**kwargs)
13871388
raise_error_from_response(r,GitlabUnsubscribeError, [200,304])
1388-
self._set_from_dict(r.json())
1389+
ifr.status_code==200:
1390+
self._set_from_dict(r.json())
13891391

13901392
defcancel_merge_when_build_succeeds(self,**kwargs):
13911393
"""Cancel merge when build succeeds."""

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp