Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 34110dd

Browse filesBrowse files
authored
Merge pull request #1835 from python-gitlab/jlvillal/id_to_encodedid
chore(objects): use `self.encoded_id` where could be a string
2 parents 0788fe6 + c3c3a91 commit 34110dd
Copy full SHA for 34110dd

File tree

Expand file treeCollapse file tree

2 files changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎gitlab/v4/objects/groups.py‎

Copy file name to clipboardExpand all lines: gitlab/v4/objects/groups.py
+1-1Lines 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"))
Collapse file

‎gitlab/v4/objects/projects.py‎

Copy file name to clipboardExpand all lines: gitlab/v4/objects/projects.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ def upload(
442442
with open(filepath, "rb") as f:
443443
filedata = f.read()
444444

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

@@ -539,7 +539,7 @@ def transfer(self, to_namespace: Union[int, str], **kwargs: Any) -> None:
539539
GitlabAuthenticationError: If authentication is not correct
540540
GitlabTransferProjectError: If the project could not be transferred
541541
"""
542-
path = f"/projects/{self.id}/transfer"
542+
path = f"/projects/{self.encoded_id}/transfer"
543543
self.manager.gitlab.http_put(
544544
path, post_data={"namespace": to_namespace}, **kwargs
545545
)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.