Commit 187ea77f authored by Michael Rose's avatar Michael Rose

index: character: skip char==0 (All Characters)

parent 612a653c
......@@ -5,10 +5,16 @@ class IndexCharacterWorker
def perform(character_id, body, index_name) "[#{character_id}] Indexing character from Crawler"
if character_id == 0 "[#{character_id}] Skipping 'All Characters' character."
character = Character.where(:id => character_id).first
name = body['name']
fandom_id = body['fandom_id'].to_i
if character.nil?
character = Character.create(:id => character_id, :fandom_id => fandom_id)
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