Skip to content

Commit 673a100

Browse files
committed
feat: add short name for geo custom zone and geo custom zone categories
1 parent 41fb7ad commit 673a100

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

core/serializers/geo_custom_zone.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class Meta:
2727
fields = [
2828
"uuid",
2929
"name",
30+
"name_short",
3031
"color",
3132
"geo_custom_zone_status",
3233
"geo_custom_zone_type",
@@ -38,6 +39,7 @@ class Meta(UuidTimestampedModelSerializerMixin.Meta):
3839
model = GeoCustomZone
3940
fields = UuidTimestampedModelSerializerMixin.Meta.fields + [
4041
"name",
42+
"name_short",
4143
"color",
4244
"geo_custom_zone_status",
4345
"geo_custom_zone_type",
@@ -79,6 +81,7 @@ class GeoCustomZoneInputSerializer(
7981
class Meta(GeoCustomZoneSerializer.Meta):
8082
fields = WithCollectivitiesInputSerializerMixin.Meta.fields + [
8183
"name",
84+
"name_short",
8285
"color",
8386
"geo_custom_zone_status",
8487
"geo_custom_zone_type",
@@ -203,6 +206,7 @@ def create(self, validated_data):
203206
)
204207

205208
validated_data["name"] = None
209+
validated_data["name_short"] = None
206210
validated_data["color"] = None
207211

208212
instance.save()

core/serializers/geo_custom_zone_category.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ class Meta(UuidTimestampedModelSerializerMixin.Meta):
99
fields = UuidTimestampedModelSerializerMixin.Meta.fields + [
1010
"color",
1111
"name",
12+
"name_short",
1213
"name_normalized",
1314
]
1415

0 commit comments

Comments
 (0)