Skip to content

Commit

Permalink
Removes test for zero mmif. Alerting user with RedirectResponse will …
Browse files Browse the repository at this point in the history
…require some thought. This is ok for now.
  • Loading branch information
afred committed Nov 9, 2023
1 parent eb3ee52 commit aaa6dfe
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions chowda/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ class BatchView(ClammerModelView):
'duplicate_batches',
'combine_batches',
'download_mmif',
'test_custom_response_action',
]

fields: ClassVar[list[Any]] = [
Expand Down Expand Up @@ -382,10 +381,6 @@ async def download_mmif(self, request: Request, pks: List[Any]) -> str:
for mmif in batch.output_mmifs
]

# Bail early with a message if there isn't anything to download.
if len(all_mmif_locations) == 0:
raise ActionFailed('No MMIFs to download')

# Download files from S3
s3 = boto3.client('s3')
downloaded_mmif_files = []
Expand Down

0 comments on commit aaa6dfe

Please sign in to comment.