Skip to content

Commit

Permalink
Fix the citation relationship data (#10431)
Browse files Browse the repository at this point in the history
  • Loading branch information
brianjgeiger authored Aug 16, 2023
1 parent d06b201 commit 59f4037
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/base/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'):
Expand Down

0 comments on commit 59f4037

Please sign in to comment.