From eed306f00480524d05d090a98bb799b974443b2a Mon Sep 17 00:00:00 2001 From: Dan LaManna Date: Mon, 13 Feb 2023 12:25:25 -0500 Subject: [PATCH] Remove overly aggressive exception handling --- dandiapi/api/services/metadata/__init__.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) 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