Skip to content

Commit

Permalink
Fixed the display of the logistics list (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-lymar committed May 29, 2024
1 parent 09a86f1 commit e884c01
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
32 changes: 16 additions & 16 deletions docs/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1556,29 +1556,29 @@ components:
id:
type: integer
readOnly: true
departure_city:
type: string
destination_city:
type: string
cost_per_tonn_auto:
type: integer
maximum: 2147483647
minimum: 0
title: Цена за рейс, руб./тн
departure_city:
type: integer
destination_city:
type: integer
PatchedTripRailway:
type: object
properties:
id:
type: integer
readOnly: true
departure_station_name:
type: string
destination_station_name:
type: string
cost_per_tonn_rw:
type: integer
maximum: 2147483647
minimum: 0
departure_station_name:
type: integer
destination_station_name:
type: integer
PatchedUserUpdate:
type: object
properties:
Expand Down Expand Up @@ -1735,15 +1735,15 @@ components:
id:
type: integer
readOnly: true
departure_city:
type: string
destination_city:
type: string
cost_per_tonn_auto:
type: integer
maximum: 2147483647
minimum: 0
title: Цена за рейс, руб./тн
departure_city:
type: integer
destination_city:
type: integer
required:
- cost_per_tonn_auto
- departure_city
Expand All @@ -1755,14 +1755,14 @@ components:
id:
type: integer
readOnly: true
departure_station_name:
type: string
destination_station_name:
type: string
cost_per_tonn_rw:
type: integer
maximum: 2147483647
minimum: 0
departure_station_name:
type: integer
destination_station_name:
type: integer
required:
- cost_per_tonn_rw
- departure_station_name
Expand Down
6 changes: 6 additions & 0 deletions logistics/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ class Meta:


class TripAutoSerializer(serializers.ModelSerializer[TripAuto]):
departure_city: serializers.CharField = serializers.CharField()
destination_city: serializers.CharField = serializers.CharField()

class Meta:
model = TripAuto
fields = "__all__"
Expand All @@ -22,6 +25,9 @@ class Meta:


class TripRailwaySerializer(serializers.ModelSerializer[TripRailway]):
departure_station_name: serializers.CharField = serializers.CharField()
destination_station_name: serializers.CharField = serializers.CharField()

class Meta:
model = TripRailway
fields = "__all__"

0 comments on commit e884c01

Please sign in to comment.