Skip to content

Commit a5b76ba

Browse files
authored
Merge pull request #3294 from DMPRoadmap/fix-byte-size
update to allow the research_outputs.byte_size field to be blank
2 parents 21ce204 + ada13ea commit a5b76ba

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
- Added CHANGELOG.md and Danger Github Action [#3257](https://github.com/DMPRoadmap/roadmap/issues/3257)
66
- Added validation with custom error message in research_output.rb to ensure a user does not enter a very large value as 'Anticipated file size'. [#3161](https://github.com/DMPRoadmap/roadmap/issues/3161)
77
- Added popover for org profile page and added explanation for public plan
8+
89
### Fixed
910

11+
- Fixed an issue that was preventing uses from leaving the research output byte_size field blank
1012
- Patched issue that was causing template visibility to default to organizationally visible after saving
1113
- Froze mail gem version [#3254](https://github.com/DMPRoadmap/roadmap/issues/3254)
1214
- Updated the CSV export so that it now includes research outputs

app/models/research_output.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ class ResearchOutput < ApplicationRecord
6565
message: UNIQUENESS_MESSAGE }
6666

6767
validates_numericality_of :byte_size, greater_than: 0, less_than_or_equal_to: 2**63,
68+
allow_blank: true,
6869
message: '(Anticipated file size) is too large. Please enter a smaller value.'
6970
# Ensure presence of the :output_type_description if the user selected 'other'
7071
validates_presence_of :output_type_description, if: -> { other? }, message: PRESENCE_MESSAGE

0 commit comments

Comments
 (0)