Skip to content

Commit

Permalink
Catch weird return values of client.remote_data_source
Browse files Browse the repository at this point in the history
  • Loading branch information
eanders committed Jun 18, 2024
1 parent 5c3c866 commit 3e8e82c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/models/unavailable_as_candidate_for.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ def self.download_columns
'Last Name' => ->(parked) { parked.client.last_name },
'CAS Client ID' => ->(parked) { parked.client_id },
'Remote ID' => ->(parked) { parked.client.remote_id },
'Remote Source' => ->(parked) { parked.client.remote_data_source&.name },
'Remote Source' => ->(parked) do
parked.client.remote_data_source&.name if parked.client.remote_data_source # rubocop:disable Style/SafeNavigation
end,
'Route' => ->(parked) { parked.route.title },
'Parked On' => ->(parked) { parked.created_at.to_date },
'Parked Until' => ->(parked) { parked.expires_at&.to_date || 'Indefinite' },
Expand Down

0 comments on commit 3e8e82c

Please sign in to comment.