From 59f40376716e0f139a93fa19de550b4de22a68ef Mon Sep 17 00:00:00 2001 From: "Brian J. Geiger" Date: Wed, 16 Aug 2023 11:16:09 -0400 Subject: [PATCH] Fix the citation relationship data (#10431) --- api/base/serializers.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/base/serializers.py b/api/base/serializers.py index 5eb46c244b6..da3a3024645 100644 --- a/api/base/serializers.py +++ b/api/base/serializers.py @@ -911,6 +911,10 @@ def to_representation(self, value): elif related_class.view_name == 'node-storage': related_id = resolved_url.kwargs['node_id'] related_type = 'node-storage' + elif related_class.view_name == 'node-citation' \ + or related_class.view_name == 'registration-citation': + related_id = resolved_url.kwargs['node_id'] + related_type = 'citation' elif related_type in ('preprint_providers', 'preprint-providers', 'registration-providers'): related_id = resolved_url.kwargs['provider_id'] elif related_type in ('registrations', 'draft_nodes'):