Skip to content

Commit

Permalink
prevent NoMethodError: undefined method `serialized?' for nil in tls …
Browse files Browse the repository at this point in the history
…option migration

the 'ldap_tls_options' setting does no longer exist and has therefore no format de
fined in the current code

we also fixed the value/deserialize to handle this more gracefully, but for good measure we also just pick the value directly here because that is more robust
  • Loading branch information
machisuji authored and oliverguenther committed Jan 10, 2025
1 parent e3b52ed commit f6e5727
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion db/migrate/20221115082403_add_ldap_tls_options.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def change
# Current LDAP library default is to not verify the certificate
MigratingAuthSource.reset_column_information

ldap_settings = Setting.find_by(name: "ldap_tls_options")&.value
ldap_settings = Setting.where(name: "ldap_tls_options").pick :value
migrate_ldap_settings(ldap_settings)
end
end
Expand Down

0 comments on commit f6e5727

Please sign in to comment.