Add brackets to fix bug

main
drunkendog 2023-09-25 20:54:13 +01:00
parent 9dbdb5200a
commit e25c048717
1 changed files with 1 additions and 1 deletions

2
api.py
View File

@ -59,4 +59,4 @@ async def get_badge(repo: str, branch: str=None, action: str=None):
status_code=status.HTTP_404_NOT_FOUND, status_code=status.HTTP_404_NOT_FOUND,
detail="Repo not found", detail="Repo not found",
) )
return RedirectResponse("https://img.shields.io/badge/" + badge_dict[repo, branch, action] if branch is not None or action is not None else badge_dict[repo]) return RedirectResponse("https://img.shields.io/badge/" + (badge_dict[repo, branch, action] if branch is not None or action is not None else badge_dict[repo]))