Skip to content
Discussion options

You must be logged in to vote

Use the dedicated top_level filter:

categories = PartCategory.list(api, top_level=True)

In InvenTree 1.4.2, that filter applies parent=None and returns only root categories.

parent='' is treated as an empty value by the parent filter, so no parent filtering is applied and the endpoint returns every category. This is not related to LibreOffice; the parent='' example in the Python documentation does not match the 1.4.2 server behavior.

See the top_level filter implementation.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@bobb-uk
Comment options

Answer selected by bobb-uk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants