|
37 | 37 | from cohorts.models import Cohort, Cohort_Perms |
38 | 38 |
|
39 | 39 | from idc_collections.models import Program, DataSource, Collection, ImagingDataCommonsVersion, Attribute, Attribute_Tooltips, DataSetType |
40 | | -from idc_collections.collex_metadata_utils import build_explorer_context, get_collex_metadata, create_file_manifest, get_cart_data, get_cart_data_studylvl, get_table_data_with_cart_data |
| 40 | +from idc_collections.collex_metadata_utils import build_explorer_context, get_collex_metadata, create_file_manifest, get_cart_data_serieslvl, get_cart_data_studylvl, get_table_data_with_cart_data |
41 | 41 | from allauth.socialaccount.models import SocialAccount |
42 | 42 | from django.core.exceptions import ObjectDoesNotExist |
43 | 43 | from django.http import HttpResponse, JsonResponse |
@@ -1068,13 +1068,7 @@ def cart_data_stats(request): |
1068 | 1068 | mxseries = int(req.get('mxseries',1000)) |
1069 | 1069 |
|
1070 | 1070 | response = get_cart_and_filterset_stats(current_filters,filtergrp_list, partitions, limit, offset, length, mxseries, results_lvl=results_level) |
1071 | | - '''if ((len(partitions)>0) and (aggregate_level == 'StudyInstanceUID')): |
1072 | | - response = get_cart_data_studylvl(filtergrp_list, partitions, limit, offset, length, mxseries, results_lvl=results_level) |
1073 | | - elif ((len(partitions)>0) and (aggregate_level == 'SeriesInstanceUID')): |
1074 | | - response = get_cart_data(filtergrp_list, partitions, field_list, limit, offset) |
1075 | | - else: |
1076 | | - response['numFound'] = 0 |
1077 | | - response['docs'] = []''' |
| 1071 | + |
1078 | 1072 | except Exception as e: |
1079 | 1073 | logger.error("[ERROR] While loading cart:") |
1080 | 1074 | logger.exception(e) |
@@ -1103,7 +1097,7 @@ def cart_data(request): |
1103 | 1097 | if ((len(partitions)>0) and (aggregate_level == 'StudyInstanceUID')): |
1104 | 1098 | response = get_cart_data_studylvl(filtergrp_list, partitions, limit, offset, length, mxseries, results_lvl=results_level) |
1105 | 1099 | elif ((len(partitions)>0) and (aggregate_level == 'SeriesInstanceUID')): |
1106 | | - response = get_cart_data(filtergrp_list, partitions, field_list, limit, offset) |
| 1100 | + response = get_cart_data_serieslvl(filtergrp_list, partitions, field_list, limit, offset) |
1107 | 1101 | else: |
1108 | 1102 | response['numFound'] = 0 |
1109 | 1103 | response['docs'] = [] |
|
0 commit comments