Skip to content

Commit

Permalink
Fix can't convert nil into Integer
Browse files Browse the repository at this point in the history
to check for '0' instead of converting the value.

Fix #5774.
  • Loading branch information
ChrisBr committed Sep 11, 2018
1 parent effc49b commit ec418d0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/api/app/controllers/webui/project_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -787,11 +787,7 @@ def monitor_set_filter(defaults)
@avail_status_values.each do |s|
id = s.delete(' ')
if params.key?(id)
next unless (begin
Integer(params[id])
rescue ArgumentError
1
end) > 0
next if params[id].to_s == '0'
else
next unless defaults
end
Expand Down

0 comments on commit ec418d0

Please sign in to comment.