Skip to content

Commit

Permalink
Merge pull request #704 from PecanProject/bulk_upload_sample_size_1
Browse files Browse the repository at this point in the history
Bulk Upload: n > 0
  • Loading branch information
dlebauer committed Jun 3, 2020
2 parents b2960a4 + d2068a6 commit d8e19c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -25,6 +25,7 @@ In this case you can simply pull down the version you want, and run `docker-comp
### Changed
- updated rails to 5.1.7
- removed static route, it was only used to render 404.
- allow n=1 in bulk upload https://github.com/PecanProject/bety/pull/704

## [5.3.0] - 2020-04-15

Expand Down
4 changes: 2 additions & 2 deletions app/models/bulk_upload_data_set.rb
Expand Up @@ -185,7 +185,7 @@ def initialize

class InvalidSampleSizeException < BulkUploadDataException
def initialize
super(:invalid_sample_size, "n must be at least 2", "Invalid sample size (n)")
super(:invalid_sample_size, "n must be at least 1", "Invalid sample size (n)")
end
end

Expand Down Expand Up @@ -768,7 +768,7 @@ def validate_csv_data
rescue ArgumentError => e
raise UnparsableSampleSizeException
else
if n <= 1
if n < 1
raise InvalidSampleSizeException
end
end
Expand Down

0 comments on commit d8e19c1

Please sign in to comment.