From d9cb1ac0857001d6d722fc02a988a7846b795bcc Mon Sep 17 00:00:00 2001 From: Nikhil Raj Date: Tue, 9 Jul 2024 21:07:31 +0530 Subject: [PATCH] precommit --- website/views.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/website/views.py b/website/views.py index 173ea6320..ac40a510f 100644 --- a/website/views.py +++ b/website/views.py @@ -4667,8 +4667,8 @@ def weekly_report(request): return HttpResponse("Weekly report sent successfully.") -def blt_tomato(request): +def blt_tomato(request): current_dir = os.path.dirname(__file__) json_file_path = os.path.join(current_dir, "fixtures", "blt_tomato_project_link.json") @@ -4679,13 +4679,10 @@ def blt_tomato(request): data = [] for project in data: - funding_details = project.get("funding_details", "").split(", ") - funding_links = [ - url.strip() for url in funding_details if url.startswith("https://") - ] - + funding_links = [url.strip() for url in funding_details if url.startswith("https://")] + funding_link = funding_links[0] if funding_links else "#" project["funding_hyperlinks"] = funding_link - return render(request, "blt_tomato.html", {"data": data}) \ No newline at end of file + return render(request, "blt_tomato.html", {"data": data})