diff --git a/gossamer_forums.rb b/gossamer_forums.rb index 015c3eb..eb1d262 100644 --- a/gossamer_forums.rb +++ b/gossamer_forums.rb @@ -1,5 +1,5 @@ # gossamer threads migration-import code -# v0.25.4 +# v0.25.5 require 'mysql2' require 'open-uri' @@ -312,7 +312,8 @@ class GossamerForumsImporter < ImportScripts::Base puts "Generating unique title for base title: #{base_title}" - while Topic.where(title: unique_title).exists? + while Topic.find_by(title: unique_title) +# while Topic.where(title: unique_title).exists? # while Topic.exists?(title: unique_title) puts "Title '#{unique_title}' already exists, generating a new one." unique_title = "#{base_title} (#{suffix})"