v0.25.5 Bugfixing...

This commit is contained in:
David Sainty 2024-07-02 14:43:03 +10:00
parent cb5159d5fe
commit 2087ab7b41

View File

@ -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})"