Skip to content

Commit

Permalink
fix: LSDV-4929: Limit export number for api/project/id/exports (Human…
Browse files Browse the repository at this point in the history
…Signal#4007)

* Update api.py

* ci: Update Feature Flags

* Update api.py

* Fix

---------

Co-authored-by: robot-ci-heartex <[email protected]>
  • Loading branch information
makseq and robot-ci-heartex authored Apr 11, 2023
1 parent 934f6c3 commit 7074bc2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions label_studio/data_export/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,13 @@ def get_queryset(self):
project = self._get_project()
return super().get_queryset().filter(project=project)

def filter_queryset(self, queryset):
queryset = super().filter_queryset(queryset)

if flag_set('fflag_fix_back_lsdv_4929_limit_exports_10042023_short', user='auto'):
return queryset.order_by('-created_at')[:100]
else:
return queryset

@method_decorator(
name='get',
Expand Down

0 comments on commit 7074bc2

Please sign in to comment.