Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Possible get null

Eric-Guoed8673355d95
diff --git a/db/migrate/20250512114003_move_users_identity_url_to_user_auth_provider_links.rb b/db/migrate/20250512114003_move_users_identity_url_to_user_auth_provider_links.rb
index 1e492080c24..67a50695465 100644
--- a/db/migrate/20250512114003_move_users_identity_url_to_user_auth_provider_links.rb
+++ b/db/migrate/20250512114003_move_users_identity_url_to_user_auth_provider_links.rb
@@ -52,7 +52,7 @@ class MoveUsersIdentityUrlToUserAuthProviderLinks < ActiveRecord::Migration[8.0]
slug, external_id = identity_url.split(":", 2)
next if slug.blank? || external_id.blank?
- auth_provider_id = auth_providers_data.find { |_, auth_provider_slug| auth_provider_slug == slug }.first
+ auth_provider_id = auth_providers_data.find { |_, auth_provider_slug| auth_provider_slug == slug }&.first
next if auth_provider_id.blank?
"(#{user_id}, #{auth_provider_id}, '#{external_id}', CURRENT_TIMESTAMP, CURRENT_TIMESTAMP)"