diff --git a/db/fixtures/001_categories.rb b/db/fixtures/001_categories.rb index edc23155f..c6880b533 100644 --- a/db/fixtures/001_categories.rb +++ b/db/fixtures/001_categories.rb @@ -2,7 +2,10 @@ ActiveRecord::Base.send(:subclasses).each{|m| m.reset_column_information} SiteSetting.refresh! -if SiteSetting.uncategorized_category_id == -1 || !Category.exists?(SiteSetting.uncategorized_category_id) +uncat_id = SiteSetting.uncategorized_category_id +uncat_id = -1 unless Numeric === uncat_id + +if uncat_id == -1 || !Category.exists?(uncat_id) puts "Seeding uncategorized category!" result = Category.exec_sql "SELECT 1 FROM categories WHERE lower(name) = 'uncategorized'"