From 75798e38e4736890408ae813eeda3c7a22cc18b6 Mon Sep 17 00:00:00 2001 From: jedi Date: Tue, 18 Jun 2024 15:26:37 +0200 Subject: [PATCH] stash --- core/tickets/serializers.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/tickets/serializers.py b/core/tickets/serializers.py index d7f89df..00acff6 100644 --- a/core/tickets/serializers.py +++ b/core/tickets/serializers.py @@ -122,6 +122,13 @@ class IssueSerializer(serializers.ModelSerializer): 'timestamp': relation.timestamp, 'item': ItemSerializer(relation.item).data, }) + for shipping_code in obj.shipping_codes.all(): + timeline.append({ + 'type': 'shipping_code', + 'id': shipping_code.id, + 'timestamp': shipping_code.used_at, + 'code': ShippingCodeSerializer(shipping_code).data, + }) return sorted(timeline, key=lambda x: x['timestamp']) def get_queryset(self):