From 85006bf741751e1fd1e86f0f01bab6ea2e9e37bc Mon Sep 17 00:00:00 2001 From: Galen Date: Thu, 2 May 2024 18:32:13 +0900 Subject: [PATCH] uses str_to_bool to handle export_sys_vals arg, re #10787 --- arches/app/search/search_export.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/arches/app/search/search_export.py b/arches/app/search/search_export.py index 1e43171c945..de5d9764367 100644 --- a/arches/app/search/search_export.py +++ b/arches/app/search/search_export.py @@ -35,7 +35,7 @@ from arches.app.utils.betterJSONSerializer import JSONSerializer, JSONDeserializer from arches.app.utils.data_management.resources.exporter import ResourceExporter from arches.app.utils.geo_utils import GeoUtils -from arches.app.utils.response import JSONResponse +from arches.app.utils.string_utils import str_to_bool import arches.app.utils.zip as zip_utils from arches.app.models.system_settings import settings @@ -52,11 +52,8 @@ def __init__(self, search_request=None): self.report_link = search_request.GET.get("reportlink", False) self.format = search_request.GET.get("format", "tilecsv") self.export_system_values = search_request.GET.get("exportsystemvalues", False) - if self.export_system_values: - try: - self.export_system_values = json.loads(self.export_system_values) - except: - pass + if not isinstance(self.export_system_values, bool): + self.export_system_values = str_to_bool(self.export_system_values) self.compact = search_request.GET.get("compact", True) self.precision = int(search_request.GET.get("precision", 5)) if self.format == "shp" and self.compact is not True: