Skip to content

Commit c6e25c6

Browse files
committed
-> testing fix for slow behavior
1 parent 3d8f28a commit c6e25c6

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

cohorts/views/views.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,7 @@ def cohort_detail(request, cohort_id):
266266
messages.error(request, 'You do not have permission to view that cohort.')
267267
return redirect('cohort_list')
268268

269+
print("Cohort detail call, counts only is: {}".format(counts_only))
269270
shared_with_ids = Cohort_Perms.objects.filter(cohort=cohort, perm=Cohort_Perms.READER).values_list('user', flat=True)
270271
shared_with_users = User.objects.filter(id__in=shared_with_ids)
271272

idc_collections/collex_metadata_utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2377,6 +2377,9 @@ def get_metadata_solr(filters, fields, sources, counts_only, collapse_on, record
23772377

23782378
if DataSetType.IMAGE_DATA in source_data_types[source.id] and not counts_only:
23792379
# Get the records
2380+
if not len(fields):
2381+
logger.warning("[WARNING] Requesting records without a field lists results in all fields being returned, which we almost never want!")
2382+
logger.warning("[WARNING] Always give a precise list of fields!")
23802383
solr_result = query_solr_and_format_result({
23812384
'collection': source.name if not record_source else record_source.name,
23822385
'fields': list(fields),

0 commit comments

Comments
 (0)