diff --git a/readthedocs/oauth/services/gitlab.py b/readthedocs/oauth/services/gitlab.py index 8566546d800..5c21b737090 100644 --- a/readthedocs/oauth/services/gitlab.py +++ b/readthedocs/oauth/services/gitlab.py @@ -77,13 +77,13 @@ def is_owned_by(owner_id): if privacy == 'private' or (repo_is_public and privacy == 'public'): try: repo = RemoteRepository.objects.get( - full_name=fields['name'], + full_name=fields['name_with_namespace'], users=self.user, account=self.account, ) except RemoteRepository.DoesNotExist: repo = RemoteRepository.objects.create( - full_name=fields['name'], + full_name=fields['name_with_namespace'], account=self.account, ) repo.users.add(self.user)