Commit 35e16638 authored by Michael Rose's avatar Michael Rose

story: update: check json stringyness

parent 81eff1aa
......@@ -17,7 +17,7 @@ class StoryUpdate < ActiveRecord::Base
def self.fix_json
StoryUpdate.all.find_in_batches(start: 2300000, batch_size: 20) do |updates|
updates.each do |update|
if update.update_contents.starts_with?('"')
if update.is_a?(String) and update.update_contents.starts_with?('"')
update.update_contents = JSON.parse(update.update_contents)!
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment