diff --git a/dandiapi/api/services/metadata/__init__.py b/dandiapi/api/services/metadata/__init__.py index c98b375a9..afd5ba1f7 100644 --- a/dandiapi/api/services/metadata/__init__.py +++ b/dandiapi/api/services/metadata/__init__.py @@ -73,14 +73,9 @@ def version_aggregate_assets_summary(version: Version): if version.version != 'draft': raise VersionHasBeenPublished() - try: - version.metadata['assetsSummary'] = aggregate_assets_summary( - version.assets.values_list('metadata', flat=True).iterator() - ) - except Exception: - # The assets summary aggregation may fail if any asset metadata is invalid, skip - # updating it if it fails. - logger.info('Error calculating assetsSummary', exc_info=True) + version.metadata['assetsSummary'] = aggregate_assets_summary( + version.assets.values_list('metadata', flat=True).iterator() + ) Version.objects.filter(id=version.id, version='draft').update( modified=timezone.now(), metadata=version.metadata