From b3ac73da3598e6ed8d2d81679c52bd7e0e3220a8 Mon Sep 17 00:00:00 2001 From: Manuel Kaufmann Date: Mon, 22 Jan 2018 10:42:02 -0500 Subject: [PATCH] Allow to import public repositories on corporate site When the DEFAULT_PRIVACY_LEVEL is ``private`` we allow to import public _and_ private repositories from Bitbucket service. --- readthedocs/oauth/services/bitbucket.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/readthedocs/oauth/services/bitbucket.py b/readthedocs/oauth/services/bitbucket.py index 6ee8b396a98..6edb2467ee3 100644 --- a/readthedocs/oauth/services/bitbucket.py +++ b/readthedocs/oauth/services/bitbucket.py @@ -103,8 +103,8 @@ def create_repository(self, fields, privacy=DEFAULT_PRIVACY_LEVEL, :type organization: RemoteOrganization :rtype: RemoteRepository """ - if (fields['is_private'] is True and privacy == 'private' or - fields['is_private'] is False and privacy == 'public'): + if ((privacy == 'private') or + (fields['is_private'] is False and privacy == 'public')): repo, _ = RemoteRepository.objects.get_or_create( full_name=fields['full_name'], account=self.account,