Fix #3480: NoMethodError error when adding artist tag to post.

This commit is contained in:
evazion
2017-12-30 16:07:52 -06:00
parent c3aff42458
commit 89b523bdae
3 changed files with 30 additions and 4 deletions

View File

@@ -0,0 +1,16 @@
#!/usr/bin/env ruby
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'config', 'environment'))
CurrentUser.user = User.system
CurrentUser.ip_addr = "127.0.0.1"
Tag.transaction do
Tag.without_timeout do
puts "Tag.where(updated_at: nil).count = #{Tag.where(updated_at: nil).count}"
puts "Tag.where(created_at: nil).count = #{Tag.where(created_at: nil).count}"
Tag.where(updated_at: nil).update_all(updated_at: Time.zone.now)
Tag.where(created_at: nil).update_all("created_at = updated_at")
end
end