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

Add missing part/stocktake nullable annotations for schema (#11266)

* Add missing nullable annotations for schema

* Bump schema version
This commit is contained in:
Joe Rogers
2026-02-09 17:53:56 -05:00
committed by GitHub
parent 026011131e
commit 3c44787dc0
2 changed files with 12 additions and 4 deletions

View File

@@ -1,11 +1,14 @@
"""InvenTree API version information.""" """InvenTree API version information."""
# InvenTree API version # InvenTree API version
INVENTREE_API_VERSION = 448 INVENTREE_API_VERSION = 449
"""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 = """
v449 -> 2026-02-07 : https://github.com/inventree/InvenTree/pull/11266
- Add missing nullable annotations to PartStocktakeSerializer
v448 -> 2026-02-05 : https://github.com/inventree/InvenTree/pull/11257 v448 -> 2026-02-05 : https://github.com/inventree/InvenTree/pull/11257
- Adds API endpoint for manually generating a stocktake entry - Adds API endpoint for manually generating a stocktake entry

View File

@@ -1240,15 +1240,20 @@ class PartStocktakeSerializer(
) )
part_ipn = serializers.CharField( part_ipn = serializers.CharField(
source='part.IPN', read_only=True, label=_('Part IPN') source='part.IPN', read_only=True, allow_null=True, label=_('Part IPN')
) )
part_description = serializers.CharField( part_description = serializers.CharField(
source='part.description', read_only=True, label=_('Part Description') source='part.description',
read_only=True,
allow_null=True,
label=_('Part Description'),
) )
part_detail = enable_filter( part_detail = enable_filter(
PartBriefSerializer(source='part', read_only=True, many=False, pricing=False), PartBriefSerializer(
source='part', read_only=True, allow_null=True, many=False, pricing=False
),
default_include=False, default_include=False,
) )