File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff 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+ if r .status_code == 201 :
1374+ self ._set_from_dict (r .json ())
13741375
13751376 def unsubscribe (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+ if r .status_code == 200 :
1390+ self ._set_from_dict (r .json ())
13891391
13901392 def cancel_merge_when_build_succeeds (self , ** kwargs ):
13911393 """Cancel merge when build succeeds."""
You can’t perform that action at this time.
0 commit comments