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:
@@ -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())
|
||||||
|
|||||||
Reference in New Issue
Block a user