Skip to content

Commit

Permalink
csv limit is 1000
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Feb 19, 2021
1 parent 4eba03e commit 0233063
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions core/common/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@
LIMIT_PARAM = 'limit'
LOOKUP_ATTRIBUTES_MUST_BE_IMPORTED = 'Lookup attributes must be imported'
LIST_DEFAULT_LIMIT = 25
CSV_DEFAULT_LIMIT = 100
CSV_DEFAULT_LIMIT = 1000
SEARCH_PARAM = 'q'
ES_RESULTS_MAX_LIMIT = 10000
INCLUDE_FACETS = 'HTTP_INCLUDEFACETS'
HTTP_COMPRESS_HEADER = 'HTTP_COMPRESS'
NOT_FOUND = 'Not found.'
Expand Down
4 changes: 2 additions & 2 deletions core/common/mixins.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from rest_framework.response import Response

from core.common.constants import HEAD, ACCESS_TYPE_EDIT, ACCESS_TYPE_VIEW, ACCESS_TYPE_NONE, INCLUDE_FACETS, \
LIST_DEFAULT_LIMIT, HTTP_COMPRESS_HEADER
LIST_DEFAULT_LIMIT, HTTP_COMPRESS_HEADER, CSV_DEFAULT_LIMIT
from core.common.permissions import HasPrivateAccess, HasOwnership, CanViewConceptDictionary
from core.common.services import S3
from .utils import write_csv_to_s3, get_csv_from_s3, get_query_params_from_url_string, compact_dict_by_values
Expand Down Expand Up @@ -195,7 +195,7 @@ def _is_member(parent, requesting_user):
requesting_user == parent.created_by

def _get_query_set_from_view(self, is_member):
return self.get_queryset() if is_member else self.get_queryset()[0:100]
return self.get_queryset() if is_member else self.get_queryset()[0:CSV_DEFAULT_LIMIT]


class PathWalkerMixin:
Expand Down

0 comments on commit 0233063

Please sign in to comment.