We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4fed048 commit af4029dCopy full SHA for af4029d
1 file changed
docs_src/body/tutorial002.py
@@ -17,7 +17,7 @@ class Item(BaseModel):
17
@app.post("/items/")
18
async def create_item(item: Item):
19
item_dict = item.dict()
20
- if item.tax:
+ if item.tax is not None:
21
price_with_tax = item.price + item.tax
22
item_dict.update({"price_with_tax": price_with_tax})
23
return item_dict
0 commit comments