Use has_key to check whether exists key

This commit is contained in:
DingZQ
2022-09-25 12:10:34 +08:00
parent 579a4be000
commit 6b14f7bd57

View File

@@ -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):