mirror of https://github.com/tiangolo/fastapi.git
📝 Update docs, compare enums with identity instead of equality (#4905)
This commit is contained in:
parent
afe44f0b25
commit
e3c055ba8f
|
|
@ -14,7 +14,7 @@ app = FastAPI()
|
|||
|
||||
@app.get("/models/{model_name}")
|
||||
async def get_model(model_name: ModelName):
|
||||
if model_name == ModelName.alexnet:
|
||||
if model_name is ModelName.alexnet:
|
||||
return {"model_name": model_name, "message": "Deep Learning FTW!"}
|
||||
|
||||
if model_name.value == "lenet":
|
||||
|
|
|
|||
Loading…
Reference in New Issue