Revert previous change for 404 logic because tuples changed to strings

main
drunkendog 2023-09-26 02:26:22 +01:00
parent 71f03209c0
commit 5f31dd9f13
1 changed files with 1 additions and 1 deletions

2
api.py
View File

@ -49,7 +49,7 @@ async def set_badge(repo: str, new_badge: str, branch: str=None, action: str=Non
@app.get("/get_badge/") @app.get("/get_badge/")
async def get_badge(repo: str, branch: str=None, action: str=None): async def get_badge(repo: str, branch: str=None, action: str=None):
if (branch is not None or action is not None and str((repo, branch, action)) not in badge_dict.keys()) or repo not in badge_dict.keys(): if str((repo, branch, action)) not in badge_dict.keys()) and repo not in badge_dict.keys():
raise HTTPException( raise HTTPException(
status_code=status.HTTP_404_NOT_FOUND, status_code=status.HTTP_404_NOT_FOUND,
detail="Badge not found", detail="Badge not found",