fix: Correctly navigate the user to the latest academic year when no data exists for the school

speedup-admin-data
Nelson Jovel 2 years ago
parent 41d942c214
commit 934f2d7f30

@ -52,6 +52,6 @@ class HomeController < ApplicationController
end
end
academic_year.range || AcademicYear.order("range DESC").first.range
academic_year&.range || AcademicYear.order("range DESC").first.range
end
end

Loading…
Cancel
Save