Replace or with and to fix bug
parent
ca5dc87e82
commit
cb714f0925
2
api.py
2
api.py
|
@ -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 (repo, branch, action) not in badge_dict.keys() or repo not in badge_dict.keys():
|
if (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",
|
||||||
|
|
Loading…
Reference in New Issue