@@ -179,7 +179,7 @@ def block(self, **kwargs: Any) -> Union[Dict[str, Any], requests.Response]:
179
179
Returns:
180
180
Whether the user status has been changed
181
181
"""
182
- path = f"/users/{ self .id } /block"
182
+ path = f"/users/{ self .encoded_id } /block"
183
183
server_data = self .manager .gitlab .http_post (path , ** kwargs )
184
184
if server_data is True :
185
185
self ._attrs ["state" ] = "blocked"
@@ -200,7 +200,7 @@ def follow(self, **kwargs: Any) -> Union[Dict[str, Any], requests.Response]:
200
200
Returns:
201
201
The new object data (*not* a RESTObject)
202
202
"""
203
- path = f"/users/{ self .id } /follow"
203
+ path = f"/users/{ self .encoded_id } /follow"
204
204
return self .manager .gitlab .http_post (path , ** kwargs )
205
205
206
206
@cli .register_custom_action ("User" )
@@ -218,7 +218,7 @@ def unfollow(self, **kwargs: Any) -> Union[Dict[str, Any], requests.Response]:
218
218
Returns:
219
219
The new object data (*not* a RESTObject)
220
220
"""
221
- path = f"/users/{ self .id } /unfollow"
221
+ path = f"/users/{ self .encoded_id } /unfollow"
222
222
return self .manager .gitlab .http_post (path , ** kwargs )
223
223
224
224
@cli .register_custom_action ("User" )
@@ -236,7 +236,7 @@ def unblock(self, **kwargs: Any) -> Union[Dict[str, Any], requests.Response]:
236
236
Returns:
237
237
Whether the user status has been changed
238
238
"""
239
- path = f"/users/{ self .id } /unblock"
239
+ path = f"/users/{ self .encoded_id } /unblock"
240
240
server_data = self .manager .gitlab .http_post (path , ** kwargs )
241
241
if server_data is True :
242
242
self ._attrs ["state" ] = "active"
@@ -257,7 +257,7 @@ def deactivate(self, **kwargs: Any) -> Union[Dict[str, Any], requests.Response]:
257
257
Returns:
258
258
Whether the user status has been changed
259
259
"""
260
- path = f"/users/{ self .id } /deactivate"
260
+ path = f"/users/{ self .encoded_id } /deactivate"
261
261
server_data = self .manager .gitlab .http_post (path , ** kwargs )
262
262
if server_data :
263
263
self ._attrs ["state" ] = "deactivated"
@@ -278,7 +278,7 @@ def activate(self, **kwargs: Any) -> Union[Dict[str, Any], requests.Response]:
278
278
Returns:
279
279
Whether the user status has been changed
280
280
"""
281
- path = f"/users/{ self .id } /activate"
281
+ path = f"/users/{ self .encoded_id } /activate"
282
282
server_data = self .manager .gitlab .http_post (path , ** kwargs )
283
283
if server_data :
284
284
self ._attrs ["state" ] = "active"
0 commit comments