Skip to content

Commit 99edb8d

Browse files
committed
500 fix for null state
1 parent df23175 commit 99edb8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/controllers/basil_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def stats
217217
@completed = BasilCommission.where.not(completed_at: nil).with_deleted
218218

219219
@average_wait_time = @completed.where('completed_at > ?', 24.hours.ago)
220-
.average(:cached_seconds_taken)
220+
.average(:cached_seconds_taken) || 0
221221
@seconds_over_time = @completed.where('completed_at > ?', 24.hours.ago)
222222
.group_by { |c| ((c.cached_seconds_taken || 0) / 60).round }
223223
.map { |minutes, list| [minutes, list.count] }

0 commit comments

Comments
 (0)