Skip to content

Commit

Permalink
add affiliated_institutions
Browse files Browse the repository at this point in the history
  • Loading branch information
John Tordoff committed Jul 18, 2024
1 parent 29cd008 commit 2ba3615
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions api/preprints/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,16 @@ class PreprintSerializer(TaxonomizableSerializerMixin, MetricsSerializerMixin, J
related_view_kwargs={'preprint_id': '<_id>'},
))

affiliated_institutions = RelationshipField(
related_view='preprints:preprints-institutions',
related_view_kwargs={'preprint_id': '<_id>'},
self_view='preprints:preprints-institutions',
self_view_kwargs={'preprint_id': '<_id>'},
read_only=False,
required=False,
allow_null=True,
)

identifiers = NoneIfWithdrawal(RelationshipField(
related_view='preprints:identifier-list',
related_view_kwargs={'preprint_id': '<_id>'},
Expand Down

0 comments on commit 2ba3615

Please sign in to comment.