Skip to content

Commit 1248df5

Browse files
committed
It's a number, not a string!
1 parent 8c7c362 commit 1248df5

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

readthedocs/oauth/services/github.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def create_repository(self, fields, privacy=None, organization=None):
111111
if (
112112
organization
113113
and owner_type == "Organization"
114-
and organization.remote_id == fields["owner"]["id"]
114+
and organization.remote_id == str(fields["owner"]["id"])
115115
):
116116
repo.organization = organization
117117

readthedocs/rtd_tests/tests/test_oauth.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ def setUp(self):
5252
}
5353
]
5454
self.repo_response_data = {
55-
'name': 'testrepo',
56-
'full_name': 'testuser/testrepo',
57-
'id': '12345678',
58-
'description': 'Test Repo',
59-
'git_url': 'git://github.com/testuser/testrepo.git',
60-
'private': False,
61-
'ssh_url': 'ssh://[email protected]:testuser/testrepo.git',
62-
'html_url': 'https://github.com/testuser/testrepo',
63-
'clone_url': 'https://github.com/testuser/testrepo.git',
55+
"name": "testrepo",
56+
"full_name": "testuser/testrepo",
57+
"id": 12345678,
58+
"description": "Test Repo",
59+
"git_url": "git://github.com/testuser/testrepo.git",
60+
"private": False,
61+
"ssh_url": "ssh://[email protected]:testuser/testrepo.git",
62+
"html_url": "https://github.com/testuser/testrepo",
63+
"clone_url": "https://github.com/testuser/testrepo.git",
6464
"owner": {
6565
"type": "User",
6666
"id": 1234,

0 commit comments

Comments
 (0)