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 c3c3a91

Browse filesBrowse 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
Copy full SHA for c3c3a91

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
@@ -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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.