2
0
mirror of https://github.com/inventree/InvenTree.git synced 2026-03-15 16:40:56 +00:00

Improve serializer field

This commit is contained in:
Oliver Walters
2025-11-30 02:40:03 +00:00
parent db468afaa5
commit 2a6493c10c

View File

@@ -181,11 +181,13 @@ class CompanySerializer(
return queryset return queryset
address = serializers.SerializerMethodField( address = serializers.SerializerMethodField(
label=_( label=_('Primary Address'),
help_text=_(
'Return the string representation for the primary address. This property exists for backwards compatibility.' 'Return the string representation for the primary address. This property exists for backwards compatibility.'
), ),
allow_null=True, allow_null=True,
) )
primary_address = serializers.SerializerMethodField(allow_null=True) primary_address = serializers.SerializerMethodField(allow_null=True)
@extend_schema_field(serializers.CharField()) @extend_schema_field(serializers.CharField())