Skip to content
Closed
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
4 changes: 4 additions & 0 deletions dojo/tools/api_sonarqube/api_client.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import requests
from django.conf import settings
from django.core.exceptions import ValidationError
from requests.exceptions import JSONDecodeError as RequestsJSONDecodeError

from dojo.utils import prepare_for_view
Expand Down Expand Up @@ -62,6 +63,9 @@ def find_project(self, project_name, organization=None, branch=None):
:param project_name:
:return:
"""
if not project_name:
msg = "Project name is required. Please provide a Service Key 1 or ensure the Product name is set."
raise ValidationError(msg)
parameters = {"q": project_name, "qualifiers": "TRK"}

if branch:
Expand Down
Loading