diff --git a/app/services/forest_liana/belongs_to_updater.rb b/app/services/forest_liana/belongs_to_updater.rb index eef84d1a..cc28efbd 100644 --- a/app/services/forest_liana/belongs_to_updater.rb +++ b/app/services/forest_liana/belongs_to_updater.rb @@ -17,7 +17,7 @@ def perform if @data.nil? new_value = nil else - association_klass = SchemaUtils.polymorphic_models(@association).select { |a| a.name.downcase == @data[:type] }.first + association_klass = SchemaUtils.polymorphic_models(@association).select { |a| a.name == @data[:type] }.first new_value = association_klass.find(@data[:id]) if @data && @data[:id] end else