MCPcopy
hub / github.com/ormar-orm/ormar / delete_item

Function delete_item

docs_src/fastapi/docs001.py:53–57  ·  view source on GitHub ↗
(item_id: int, item: Item = None)

Source from the content-addressed store, hash-verified

51
52@app.delete("/items/{item_id}")
53async def delete_item(item_id: int, item: Item = None):
54 if item:
55 return {"deleted_rows": await item.delete()}
56 item_db = await Item.objects.get(pk=item_id)
57 return {"deleted_rows": await item_db.delete()}

Callers

nothing calls this directly

Calls 2

deleteMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected