From dc0b0f818eeb7b586bfecd547a5eb47195568e30 Mon Sep 17 00:00:00 2001 From: jedi Date: Fri, 14 Jun 2024 23:17:07 +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 c76f476..f954130 100644 --- a/core/tickets/serializers.py +++ b/core/tickets/serializers.py @@ -102,6 +102,13 @@ class IssueSerializer(serializers.ModelSerializer): 'timestamp': assignment.timestamp, 'assigned_to': assignment.assigned_to.username, }) + for relation in obj.item_relations.all(): + timeline.append({ + 'type': 'item_relation', + 'id': relation.id, + 'timestamp': relation.timestamp, + 'item': ItemSerializer(relation.item).data, + }) return sorted(timeline, key=lambda x: x['timestamp']) def get_queryset(self):