Skip to content

Commit b7f4b41

Browse files
committed
fix: wrong number
1 parent a5bd0ac commit b7f4b41

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ckanext/statistics/lib/download_statistics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,10 +244,10 @@ def _get_vds_download(self, year=None, month=None, resource_id=None):
244244
resource_type = self.resource_type(rid)
245245
res_types.add(resource_type)
246246
stats_dict[key][resource_type]['records'] += rc or 0
247-
if len(res_types) > 0:
247+
if len(res_types) > 1:
248248
stats_dict[key]['mixed']['download_events'] += 1
249249
else:
250-
stats_dict[key][res_types[0]]['download_events'] += 1
250+
stats_dict[key][list(res_types)[0]]['download_events'] += 1
251251
return dict(stats_dict)
252252

253253
@cache_region('statistics_long', 'dl_stats_gbif')

0 commit comments

Comments
 (0)