diff --git a/app/controllers/admin/worldwide_offices_controller.rb b/app/controllers/admin/worldwide_offices_controller.rb index 304a96489ff3..7fdd1bf1f396 100644 --- a/app/controllers/admin/worldwide_offices_controller.rb +++ b/app/controllers/admin/worldwide_offices_controller.rb @@ -23,7 +23,7 @@ def update 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? + contact_number_attribute[:_destroy] = true unless contact_number_attribute[:label].present? && contact_number_attribute[:number].present? end end