Skip to content

Commit

Permalink
Merge pull request #19 from hackathone-prosept-team2/feature/matches_…
Browse files Browse the repository at this point in the history
…finish

changed display of status
  • Loading branch information
ratarov authored Dec 4, 2023
2 parents 9f017ca + 9e75cc1 commit 8a1a951
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/api/v1/dealers/serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ class Meta:
model = Match
fields = ("id", "product", "metrics", "status")

def to_representation(self, instance):
rep = super().to_representation(instance)
rep["status"] = instance.get_status_display()
return rep


class ChooseMatchSerializer(serializers.Serializer):
product_id = serializers.IntegerField()
Expand Down

0 comments on commit 8a1a951

Please sign in to comment.