From 2ba3615f3f4c05e9eed2c8952345f0ee64496df9 Mon Sep 17 00:00:00 2001 From: John Tordoff <> Date: Thu, 18 Jul 2024 11:27:41 -0400 Subject: [PATCH] add affiliated_institutions --- api/preprints/serializers.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/api/preprints/serializers.py b/api/preprints/serializers.py index 6a00e581f4d7..5e74c162d2f8 100644 --- a/api/preprints/serializers.py +++ b/api/preprints/serializers.py @@ -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>'},