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):
1370
1370
1371
1371
r = self .gitlab ._raw_post (url , ** kwargs )
1372
1372
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 ())
1374
1375
1375
1376
def unsubscribe (self , ** kwargs ):
1376
1377
"""Unsubscribe a MR.
@@ -1385,7 +1386,8 @@ def unsubscribe(self, **kwargs):
1385
1386
1386
1387
r = self .gitlab ._raw_delete (url , ** kwargs )
1387
1388
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 ())
1389
1391
1390
1392
def cancel_merge_when_build_succeeds (self , ** kwargs ):
1391
1393
"""Cancel merge when build succeeds."""
You can’t perform that action at this time.
0 commit comments