2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-01-11 21:57:57 +00:00

Fix Schema Nullables (#11092)

* Add missing nullable annotations

* bump API version
This commit is contained in:
Joe Rogers
2026-01-09 20:44:22 -05:00
committed by GitHub
parent 70fcaa7808
commit a74d809fc2
3 changed files with 12 additions and 3 deletions

View File

@@ -1,11 +1,14 @@
"""InvenTree API version information.""" """InvenTree API version information."""
# InvenTree API version # InvenTree API version
INVENTREE_API_VERSION = 438 INVENTREE_API_VERSION = 439
"""Increment this API version number whenever there is a significant change to the API that any clients need to know about.""" """Increment this API version number whenever there is a significant change to the API that any clients need to know about."""
INVENTREE_API_TEXT = """ INVENTREE_API_TEXT = """
v439 -> 2026-01-09 : https://github.com/inventree/InvenTree/pull/11092
- Add missing nullable annotations
v438 -> 2026-01-09 : https://github.com/inventree/InvenTree/pull/11104 v438 -> 2026-01-09 : https://github.com/inventree/InvenTree/pull/11104
- Adds a simpler / faster health check endpoint at /api/system/health/ - Adds a simpler / faster health check endpoint at /api/system/health/

View File

@@ -1378,7 +1378,9 @@ class BuildLineSerializer(
) )
allocations = enable_filter( allocations = enable_filter(
BuildItemSerializer(many=True, read_only=True, build_detail=False), BuildItemSerializer(
many=True, read_only=True, allow_null=True, build_detail=False
),
True, True,
prefetch_fields=[ prefetch_fields=[
'allocations', 'allocations',
@@ -1426,6 +1428,7 @@ class BuildLineSerializer(
source='bom_item', source='bom_item',
many=False, many=False,
read_only=True, read_only=True,
allow_null=True,
pricing=False, pricing=False,
substitutes=False, substitutes=False,
sub_part_detail=False, sub_part_detail=False,
@@ -1455,6 +1458,7 @@ class BuildLineSerializer(
source='bom_item.sub_part', source='bom_item.sub_part',
many=False, many=False,
read_only=True, read_only=True,
allow_null=True,
pricing=False, pricing=False,
), ),
False, False,

View File

@@ -808,7 +808,9 @@ class ParameterSerializer(
) )
updated_by_detail = enable_filter( updated_by_detail = enable_filter(
UserSerializer(source='updated_by', read_only=True, many=False), UserSerializer(
source='updated_by', read_only=True, allow_null=True, many=False
),
True, True,
prefetch_fields=['updated_by'], prefetch_fields=['updated_by'],
) )