mirror of
https://github.com/fastapi/fastapi.git
synced 2026-09-12 21:38:39 -04:00
📝 Update docs, compare enums with identity instead of equality (#4905)
This commit is contained in:
1 parent
afe44f0b25
commit
e3c055ba8f
1 file changed
+1
-1
@@ -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":
|
||||
|
||||
Reference in new issue
Block a user