Browse Source

📝 Update docs, compare enums with identity instead of equality (#4905)

pull/5075/merge
Micael Jarniac 3 years ago
committed by GitHub
parent
commit
e3c055ba8f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      docs_src/path_params/tutorial005.py

2
docs_src/path_params/tutorial005.py

@ -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…
Cancel
Save