2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-10-30 12:45:42 +00:00

Add missing nullable annotation to optional field (#10651)

* Add missing nullable annotation to optional field

* Bump api version

* Fix merge mistake
This commit is contained in:
Joe Rogers
2025-10-23 15:52:14 +02:00
committed by GitHub
parent b819b0a05e
commit 435d34568b
2 changed files with 7 additions and 2 deletions

View File

@@ -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

View File

@@ -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',
)