use dict.get() to check 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/")
|
@app.get("/isprojectlocked/")
|
||||||
async def fastapi_is_locked(network: str):
|
async def fastapi_is_locked(network: str):
|
||||||
return lockedPrjs.has_key(network)
|
return lockedPrjs.get(network) != None
|
||||||
|
|
||||||
@app.post("/lockproject/")
|
@app.post("/lockproject/")
|
||||||
async def fastapi_lock_project(network: str, id: str):
|
async def fastapi_lock_project(network: str, id: str):
|
||||||
|
|||||||
Reference in New Issue
Block a user