Skip to content

Commit 7f3a668

Browse files
[ENG-8936] API: Allow /v2/users/me/preprints list view to filter by tags (#11232)
1 parent 82cdfff commit 7f3a668

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

api/base/filters.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,9 @@ def postprocess_query_param(self, key, field_name, operation):
605605
if field_name == 'subjects':
606606
self.postprocess_subject_query_param(operation)
607607

608+
if field_name == 'tags':
609+
super().postprocess_query_param(key, field_name, operation)
610+
608611
def preprints_queryset(self, base_queryset, auth_user, allow_contribs=True, public_only=False, latest_only=False):
609612
preprints = Preprint.objects.can_view(
610613
base_queryset=base_queryset,

api/preprints/serializers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ class PreprintSerializer(TaxonomizableSerializerMixin, MetricsSerializerMixin, J
102102
'subjects',
103103
'reviews_state',
104104
'node_is_public',
105+
'tags',
105106
])
106107
available_metrics = frozenset([
107108
'downloads',

0 commit comments

Comments
 (0)