@@ -179,7 +179,7 @@ def block(self, **kwargs: Any) -> Union[Dict[str, Any], requests.Response]:
179179 Returns:
180180 Whether the user status has been changed
181181 """
182- path = f"/users/{ self .id } /block"
182+ path = f"/users/{ self .encoded_id } /block"
183183 server_data = self .manager .gitlab .http_post (path , ** kwargs )
184184 if server_data is True :
185185 self ._attrs ["state" ] = "blocked"
@@ -200,7 +200,7 @@ def follow(self, **kwargs: Any) -> Union[Dict[str, Any], requests.Response]:
200200 Returns:
201201 The new object data (*not* a RESTObject)
202202 """
203- path = f"/users/{ self .id } /follow"
203+ path = f"/users/{ self .encoded_id } /follow"
204204 return self .manager .gitlab .http_post (path , ** kwargs )
205205
206206 @cli .register_custom_action ("User" )
@@ -218,7 +218,7 @@ def unfollow(self, **kwargs: Any) -> Union[Dict[str, Any], requests.Response]:
218218 Returns:
219219 The new object data (*not* a RESTObject)
220220 """
221- path = f"/users/{ self .id } /unfollow"
221+ path = f"/users/{ self .encoded_id } /unfollow"
222222 return self .manager .gitlab .http_post (path , ** kwargs )
223223
224224 @cli .register_custom_action ("User" )
@@ -236,7 +236,7 @@ def unblock(self, **kwargs: Any) -> Union[Dict[str, Any], requests.Response]:
236236 Returns:
237237 Whether the user status has been changed
238238 """
239- path = f"/users/{ self .id } /unblock"
239+ path = f"/users/{ self .encoded_id } /unblock"
240240 server_data = self .manager .gitlab .http_post (path , ** kwargs )
241241 if server_data is True :
242242 self ._attrs ["state" ] = "active"
@@ -257,7 +257,7 @@ def deactivate(self, **kwargs: Any) -> Union[Dict[str, Any], requests.Response]:
257257 Returns:
258258 Whether the user status has been changed
259259 """
260- path = f"/users/{ self .id } /deactivate"
260+ path = f"/users/{ self .encoded_id } /deactivate"
261261 server_data = self .manager .gitlab .http_post (path , ** kwargs )
262262 if server_data :
263263 self ._attrs ["state" ] = "deactivated"
@@ -278,7 +278,7 @@ def activate(self, **kwargs: Any) -> Union[Dict[str, Any], requests.Response]:
278278 Returns:
279279 Whether the user status has been changed
280280 """
281- path = f"/users/{ self .id } /activate"
281+ path = f"/users/{ self .encoded_id } /activate"
282282 server_data = self .manager .gitlab .http_post (path , ** kwargs )
283283 if server_data :
284284 self ._attrs ["state" ] = "active"
0 commit comments