Skip to content

A platform for community discussion. Free, open, simple.

DEV: Fix user simulator script.

Dan Ungureanuab6ad220c703
diff --git a/script/user_simulator.rb b/script/user_simulator.rb
index b6888499f9e..4d76d27bf6d 100644
--- a/script/user_simulator.rb
+++ b/script/user_simulator.rb
@@ -50,7 +50,7 @@ puts "Simulating activity for user id #{user.id}: #{user.name}"
while true
puts "Creating a random topic"
category = Category.where(read_restricted: false).order('random()').first
- PostCreator.create(user, raw: sentence, title: sentence[0..50].strip, category: category.name)
+ PostCreator.create(user, raw: sentence, title: sentence[0..50].strip, category: category.id)
puts "creating random reply"
PostCreator.create(user, raw: sentence, topic_id: last_topics.sample)