diff --git a/.github/release.yml b/.github/release.yml index 34562cd9b7..3bba14b063 100644 --- a/.github/release.yml +++ b/.github/release.yml @@ -4,6 +4,7 @@ changelog: exclude: labels: - translation + - documentation categories: - title: Breaking Changes labels: diff --git a/docs/docs/api/python/examples.md b/docs/docs/api/python/examples.md index cbe4a7b32c..a02a891a03 100644 --- a/docs/docs/api/python/examples.md +++ b/docs/docs/api/python/examples.md @@ -188,6 +188,18 @@ loc = StockLocation(api, pk=12) item.transferStock(loc, quantity=50) ``` +### Delete a Part + +To delete a [Part instance](../../part/part.md), first in needs to be marked as *inactive* (otherwise it will throw an error): + +```python +from inventree.part import Part + +part = Part(api, pk=10) +part.save(data={'active': False}) +part.delete() +``` + ### Bulk Delete Some database models support bulk delete operations, where multiple database entries can be deleted in a single API query.