DEV: Fix user simulator script.

This commit is contained in:
Dan Ungureanu 2019-07-09 18:52:08 +03:00
parent 5f0d38341e
commit ab6ad220c7
No known key found for this signature in database
GPG Key ID: 0AA2A00D6ACC8B84
1 changed files with 1 additions and 1 deletions

View File

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