Skip to content
This repository was archived by the owner on May 5, 2025. It is now read-only.

Commit 2765ece

Browse files
committed
fix: update get_ta_url to handle null branch
1 parent 71420fd commit 2765ece

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

services/urls.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,16 @@ def get_plan_url(pull: Pull) -> str:
199199

200200

201201
def get_test_analytics_url(repo: Repository, commit: Commit) -> str:
202+
if commit.branch is not None:
203+
branch_name = quote_plus(commit.branch)
204+
else:
205+
branch_name = quote_plus(repo.branch)
202206
return SiteUrls.test_analytics_url.get_url(
203207
dashboard_base_url=get_dashboard_base_url(),
204208
service_short=services_short_dict.get(repo.service),
205209
username=repo.owner.username,
206210
project_name=repo.name,
207-
branch_name=quote_plus(commit.branch),
211+
branch_name=branch_name,
208212
)
209213

210214

0 commit comments

Comments
 (0)