Skip to content

Commit 545c829

Browse files
committed
updated openapi.yml
1 parent 6bbd96b commit 545c829

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎openapi.yml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4838,7 +4838,9 @@ components:
48384838
type: string
48394839
maxLength: 200
48404840
region:
4841-
$ref: '#/components/schemas/RegionSummary'
4841+
oneOf:
4842+
- $ref: '#/components/schemas/RegionSummary'
4843+
- type: 'null'
48424844
names:
48434845
type: array
48444846
items:

‎pokemon_v2/serializers.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1154,7 +1154,7 @@ class Meta:
11541154

11551155

11561156
class LocationDetailSerializer(serializers.ModelSerializer[Location]):
1157-
region = RegionSummarySerializer()
1157+
region = RegionSummarySerializer(allow_null=True)
11581158
names = LocationNameSerializer(many=True, read_only=True, source="locationname")
11591159
game_indices = LocationGameIndexSerializer(many=True, read_only=True, source="locationgameindex")
11601160
areas = LocationAreaSummarySerializer(many=True, read_only=True, source="locationarea")

0 commit comments

Comments
 (0)