Skip to content

Commit

Permalink
Check for array empty instead of nil
Browse files Browse the repository at this point in the history
  • Loading branch information
MisterMartin committed Mar 10, 2023
1 parent 158434c commit cf79461
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/instrument.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def downsample_rate (starttime, endtime, var_id)
.where(time: starttime..endtime)
end

if count.to_a.nil?
if count.to_a.empty?
return self.sample_rate_seconds
end

Expand Down

0 comments on commit cf79461

Please sign in to comment.