DEV: Fix user simulator script.

DEV: Fix user simulator script.

diff --git a/script/user_simulator.rb b/script/user_simulator.rb
index b688849..4d76d27 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)

GitHub sha: ab6ad220

BTW some additional context here would be great. For example: PostCreator was expecting a category_id and we were passing it a name

1 Like