Skip to content

Commit 0dd87f8

Browse files
author
George
committed
separate arguments for disk size and other stat calculations in image explorer call
1 parent dc57c17 commit 0dd87f8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

idc/views.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -819,6 +819,7 @@ def explore_data_page(request, filter_path=False, path_filters=None):
819819
source = req.get('data_source_type', DataSource.SOLR)
820820
versions = json.loads(req.get('versions', '[]'))
821821
filters = json.loads(req.get('filters', '{}'))
822+
with_stats = (req.get('with_stats', 'true').lower() == "true")
822823
disk_size = (req.get('disk_size', 'False').lower() == "true")
823824

824825
fields = json.loads(req.get('fields', '[]'))
@@ -860,7 +861,7 @@ def explore_data_page(request, filter_path=False, path_filters=None):
860861

861862
context = build_explorer_context(
862863
is_dicofdic, source, versions, filters, fields, order_docs, counts_only, with_related, with_derived,
863-
collapse_on, is_json, uniques=uniques, totals=totals, disk_size=disk_size
864+
collapse_on, is_json, uniques=uniques, totals=totals, with_stats=with_stats, disk_size=disk_size
864865
)
865866

866867
if not('totals' in context):
@@ -878,7 +879,6 @@ def explore_data_page(request, filter_path=False, path_filters=None):
878879
if not ('disk_size' in context['totals']):
879880
context['totals']['disk_size'] = '0.0 GB'
880881

881-
882882
if not is_json:
883883
# These are filters to be loaded *after* a page render
884884
context['mode']=mode

0 commit comments

Comments
 (0)