Remove unnecessary safe navigation operator
The heading is used with `find_by_slug_or_id`, which raises an exception if it isn't found, so executing `@heading.group` after it does not need the safe navigation operator.
This commit is contained in:
@@ -148,7 +148,7 @@ module Budgets
|
||||
def load_heading
|
||||
if params[:heading_id].present?
|
||||
@heading = @budget.headings.find_by_slug_or_id! params[:heading_id]
|
||||
@assigned_heading = @ballot&.heading_for_group(@heading&.group)
|
||||
@assigned_heading = @ballot&.heading_for_group(@heading.group)
|
||||
load_map
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user