This commit is contained in:
j3d1 2024-06-14 23:17:07 +02:00
parent 9871394833
commit dc0b0f818e

View file

@ -102,6 +102,13 @@ class IssueSerializer(serializers.ModelSerializer):
'timestamp': assignment.timestamp, 'timestamp': assignment.timestamp,
'assigned_to': assignment.assigned_to.username, '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']) return sorted(timeline, key=lambda x: x['timestamp'])
def get_queryset(self): def get_queryset(self):