Use has_key to check whether exists key
This commit is contained in:
2
main.py
2
main.py
@@ -70,7 +70,7 @@ async def fastapi_copy_project(source: str, target: str):
|
||||
|
||||
@app.get("/isprojectlocked/")
|
||||
async def fastapi_is_locked(network: str):
|
||||
return str in lockedPrjs
|
||||
return lockedPrjs.has_key(network)
|
||||
|
||||
@app.post("/lockproject/")
|
||||
async def fastapi_lock_project(network: str, id: str):
|
||||
|
||||
Reference in New Issue
Block a user