Skip to content

Commit c3c3a91

Browse files
chore(objects): use self.encoded_id where could be a string
Updated a few remaining usages of `self.id` to use `self.encoded_id` where it could be a string value.
1 parent 27e0742 commit c3c3a91

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

gitlab/v4/objects/groups.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def transfer_project(self, project_id: int, **kwargs: Any) -> None:
9292
GitlabAuthenticationError: If authentication is not correct
9393
GitlabTransferProjectError: If the project could not be transferred
9494
"""
95-
path = f"/groups/{self.id}/projects/{project_id}"
95+
path = f"/groups/{self.encoded_id}/projects/{project_id}"
9696
self.manager.gitlab.http_post(path, **kwargs)
9797

9898
@cli.register_custom_action("Group", ("scope", "search"))

gitlab/v4/objects/projects.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ def upload(
441441
with open(filepath, "rb") as f:
442442
filedata = f.read()
443443

444-
url = f"/projects/{self.id}/uploads"
444+
url = f"/projects/{self.encoded_id}/uploads"
445445
file_info = {"file": (filename, filedata)}
446446
data = self.manager.gitlab.http_post(url, files=file_info)
447447

@@ -538,7 +538,7 @@ def transfer_project(self, to_namespace: str, **kwargs: Any) -> None:
538538
GitlabAuthenticationError: If authentication is not correct
539539
GitlabTransferProjectError: If the project could not be transferred
540540
"""
541-
path = f"/projects/{self.id}/transfer"
541+
path = f"/projects/{self.encoded_id}/transfer"
542542
self.manager.gitlab.http_put(
543543
path, post_data={"namespace": to_namespace}, **kwargs
544544
)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy