Skip to content

Commit

Permalink
Fix lint issue
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick Avery <[email protected]>
  • Loading branch information
psavery committed Oct 18, 2023
1 parent 666109f commit 0845ef9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sources/dicom/large_image_source_dicom/assetstore/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,14 @@ def _importData(self, assetstore, params):

limit = params.get('limit') or None
if limit is not None:
error_msg = 'Invalid limit'
try:
limit = int(limit)
except ValueError:
raise RestException('Invalid limit')
raise RestException(error_msg)

if limit < 1:
raise RestException('Invalid limit')
raise RestException(error_msg)

try:
search_filters = json.loads(params.get('filters') or '{}')
Expand Down

0 comments on commit 0845ef9

Please sign in to comment.