From 435d34568b0c0e367b947429d284b07ac40bf0d3 Mon Sep 17 00:00:00 2001 From: Joe Rogers <1337joe@users.noreply.github.com> Date: Thu, 23 Oct 2025 15:52:14 +0200 Subject: [PATCH] Add missing nullable annotation to optional field (#10651) * Add missing nullable annotation to optional field * Bump api version * Fix merge mistake --- src/backend/InvenTree/InvenTree/api_version.py | 5 ++++- src/backend/InvenTree/part/serializers.py | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/backend/InvenTree/InvenTree/api_version.py b/src/backend/InvenTree/InvenTree/api_version.py index 36709464b8..7bbaf7d9e9 100644 --- a/src/backend/InvenTree/InvenTree/api_version.py +++ b/src/backend/InvenTree/InvenTree/api_version.py @@ -1,11 +1,14 @@ """InvenTree API version information.""" # InvenTree API version -INVENTREE_API_VERSION = 415 +INVENTREE_API_VERSION = 416 """Increment this API version number whenever there is a significant change to the API that any clients need to know about.""" INVENTREE_API_TEXT = """ +v416 -> 2025-10-22 : https://github.com/inventree/InvenTree/pull/10651 + - Add missing nullable to make price_breaks (from v412) optional + v415 -> 2025-10-22 : https://github.com/inventree/InvenTree/pull/10650 - Adds "shipment_address" fields to the SalesOrderShipment API endpoints diff --git a/src/backend/InvenTree/part/serializers.py b/src/backend/InvenTree/part/serializers.py index 681cd5a507..16e7d364d0 100644 --- a/src/backend/InvenTree/part/serializers.py +++ b/src/backend/InvenTree/part/serializers.py @@ -1042,7 +1042,9 @@ class PartSerializer( ) price_breaks = enable_filter( - PartSalePriceSerializer(source='salepricebreaks', many=True, read_only=True), + PartSalePriceSerializer( + source='salepricebreaks', many=True, read_only=True, allow_null=True + ), False, filter_name='price_breaks', )