Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions dojo/tools/api_sonarqube/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,9 +496,14 @@ def test_connection(self):

def test_product_connection(self, api_scan_configuration):
organization = api_scan_configuration.service_key_2 or None
project = self.get_project(
api_scan_configuration.service_key_1, organization=organization,
)
if api_scan_configuration.service_key_1:
project = self.get_project(
api_scan_configuration.service_key_1, organization=organization,
)
else:
project = self.find_project(
api_scan_configuration.product.name, organization=organization,
)
project_name = project.get("name")
message_prefix = "You have access to project"
return (
Expand Down