Skip to content

Commit

Permalink
Adding review action from #9084
Browse files Browse the repository at this point in the history
that I missed.
  • Loading branch information
callumknights committed May 30, 2024
1 parent cd622b0 commit 2d5fd5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/admin/worldwide_offices_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ def update

update_params[:service_ids] ||= []

if update_params.dig(:contact_attributes, :contact_numbers_attributes)
update_params.dig(:contact_attributes, :contact_numbers_attributes).each do |_id, contact_number_attribute|
if (contact_numbers_attributes = update_params.dig(:contact_attributes, :contact_numbers_attributes))
contact_numbers_attributes.each do |_id, contact_number_attribute|
contact_number_attribute[:_destroy] = true if contact_number_attribute[:label].empty? && contact_number_attribute[:number].empty?
end
end
Expand Down

0 comments on commit 2d5fd5d

Please sign in to comment.