From 7bc9e50200f913613fa6e78111b310237feb11c2 Mon Sep 17 00:00:00 2001 From: Jon Van Oast Date: Thu, 1 Feb 2024 16:37:28 -0700 Subject: [PATCH] allow some "reasonable" huge number of export --- app/modules/encounters/resources.py | 2 +- app/modules/individuals/resources.py | 2 +- app/modules/sightings/resources.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/modules/encounters/resources.py b/app/modules/encounters/resources.py index a88209bc4..761efe324 100644 --- a/app/modules/encounters/resources.py +++ b/app/modules/encounters/resources.py @@ -249,7 +249,7 @@ class EncounterExport(Resource): ) def post(self): search = request.get_json() - encs = Encounter.elasticsearch(search) + encs = Encounter.elasticsearch(search, limit=15000) if not encs: abort(400, 'No results to export') from flask import send_file diff --git a/app/modules/individuals/resources.py b/app/modules/individuals/resources.py index f0fad8e2c..145549b63 100644 --- a/app/modules/individuals/resources.py +++ b/app/modules/individuals/resources.py @@ -272,7 +272,7 @@ class IndividualExport(Resource): ) def post(self): search = request.get_json() - indivs = Individual.elasticsearch(search) + indivs = Individual.elasticsearch(search, limit=15000) if not indivs: abort(400, 'No results to export') from flask import send_file diff --git a/app/modules/sightings/resources.py b/app/modules/sightings/resources.py index b22aca7b9..21b2f2777 100644 --- a/app/modules/sightings/resources.py +++ b/app/modules/sightings/resources.py @@ -149,7 +149,7 @@ class SightingExport(Resource): ) def post(self): search = request.get_json() - sights = Sighting.elasticsearch(search) + sights = Sighting.elasticsearch(search, limit=15000) if not sights: abort(400, 'No results to export') from flask import send_file