Skip to content

Commit

Permalink
Set default to first item in REPORT_TYPES
Browse files Browse the repository at this point in the history
  • Loading branch information
Kagemaru committed Jan 9, 2025
1 parent ee8e7a4 commit 36a5a31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/revenue_reports_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ def csv_filename
end

def report_type
grouping = params[:grouping].presence || 'Department'
REPORT_TYPES.find { |r| r.grouping_name == grouping }
grouping = params[:grouping].presence
REPORT_TYPES.find { |r| r.grouping_name == grouping } || REPORT_TYPES.first
end

def set_period
Expand Down

0 comments on commit 36a5a31

Please sign in to comment.