Skip to content

Commit

Permalink
Default to "None" for the limit
Browse files Browse the repository at this point in the history
On the master branch, if I try to import with no limit set, I get the
following error:

```
Invalid value for integer parameter limit: .
```

We should remove the datatype restriction and set the default to `None`.
That way, it will work properly.

Signed-off-by: Patrick Avery <[email protected]>
  • Loading branch information
psavery committed Nov 2, 2023
1 parent bc3cbec commit 2a2d355
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sources/dicom/large_image_source_dicom/assetstore/rest.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def _importData(self, assetstore, params, progress):
enum=('folder', 'user', 'collection'),
required=True)
.param('limit', 'The maximum number of results to import.',
required=False, dataType='int')
required=False, default=None)
.param('filters', 'Any search parameters to filter DICOM objects.',
required=False, default='{}')
.param('progress', 'Whether to record progress on this operation.',
Expand Down
2 changes: 1 addition & 1 deletion sources/dicom/test_dicom/web_client_specs/dicomWebSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ describe('DICOMWeb assetstore', function () {
});

waitsFor(function () {
return $('.g-validation-failed-message').html().includes('Invalid value');
return $('.g-validation-failed-message').html() === 'Invalid limit';
}, 'Invalid limit check (float)');

runs(function () {
Expand Down

0 comments on commit 2a2d355

Please sign in to comment.