Skip to content

Commit

Permalink
manually set core-search kwargs on request obj, re #10804
Browse files Browse the repository at this point in the history
  • Loading branch information
whatisgalen committed Apr 19, 2024
1 parent f1a5646 commit b8bc867
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arches/app/etl_modules/base_data_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ def get_preview_data(self, node_id, search_url, language_code, operation, old_te
request.method = "GET"
request.GET["paging-filter"] = 1
request.GET["tiles"] = True
request.GET["core-search"] = True
request.GET["localize-descriptors"] = True


if search_url:
Expand Down
2 changes: 2 additions & 0 deletions arches/app/search/search_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ def __init__(self, search_request=None):
search_request.GET = search_request.GET.copy()
search_request.GET["tiles"] = True
search_request.GET["export"] = True
search_request.GET["core-search"] = True
search_request.GET["localize-descriptors"] = True
self.report_link = search_request.GET.get("reportlink", False)
self.format = search_request.GET.get("format", "tilecsv")
self.compact = search_request.GET.get("compact", True)
Expand Down
2 changes: 2 additions & 0 deletions tests/views/search_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,8 @@ def get_response_json(client, temporal_filter=None, term_filter=None, spatial_fi
query["term-filter"] = JSONSerializer().serialize(term_filter)
if spatial_filter is not None:
query["map-filter"] = JSONSerializer().serialize(spatial_filter)
query["core-search"] = True
query["localize-descriptors"] = True
resource_reviewer_group = Group.objects.get(name="Resource Reviewer")
test_user = User.objects.get(username="unpriviliged_user")
test_user.groups.add(resource_reviewer_group)
Expand Down

0 comments on commit b8bc867

Please sign in to comment.