Skip to content

Commit

Permalink
precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhil25803 committed Jul 9, 2024
1 parent f40301c commit d9cb1ac
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions website/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand All @@ -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})
return render(request, "blt_tomato.html", {"data": data})

0 comments on commit d9cb1ac

Please sign in to comment.