diff --git a/back/boxtribute_server/graph_ql/definitions/protected/types.graphql b/back/boxtribute_server/graph_ql/definitions/protected/types.graphql index 04b4b9d7a..4e7f4ff73 100644 --- a/back/boxtribute_server/graph_ql/definitions/protected/types.graphql +++ b/back/boxtribute_server/graph_ql/definitions/protected/types.graphql @@ -468,7 +468,7 @@ input FilterBoxInput { input FilterProductInput { includeDeleted: Boolean = false - type: ProductTypeFilter = Custom + type: ProductTypeFilter = All } input FilterBaseInput { diff --git a/back/boxtribute_server/graph_ql/filtering.py b/back/boxtribute_server/graph_ql/filtering.py index 9d5843522..54d3efbec 100644 --- a/back/boxtribute_server/graph_ql/filtering.py +++ b/back/boxtribute_server/graph_ql/filtering.py @@ -119,10 +119,10 @@ def derive_product_filter(filter_input): parameters given, return empty conditions (i.e. no filtering applied). """ include_deleted = False - type_filter = ProductTypeFilter.Custom + type_filter = ProductTypeFilter.All if filter_input: include_deleted = filter_input.get("include_deleted") - type_filter = filter_input.get("type", ProductTypeFilter.Custom) + type_filter = filter_input.get("type", ProductTypeFilter.All) conditions = [] diff --git a/back/test/endpoint_tests/test_product.py b/back/test/endpoint_tests/test_product.py index 211b05b12..d36e398cf 100644 --- a/back/test/endpoint_tests/test_product.py +++ b/back/test/endpoint_tests/test_product.py @@ -51,7 +51,7 @@ def test_product_query(read_only_client, default_product, default_size, another_ "filter_input,ids", [ # Test case 8.1.26 - ["includeDeleted: true", [1, 3, 4]], + ["includeDeleted: true", [1, 3, 4, 5, 6]], ["type: Custom", [1, 3]], ["type: StandardInstantiation", [5]], ["type: All", [1, 3, 5]],