fix to previous commit

This commit is contained in:
Tyler Renelle 2013-04-07 20:43:16 -04:00
parent 9222b56777
commit ba750141cf

View file

@ -266,10 +266,10 @@ cron = (model) ->
tasks = user.get('tasks')
_.each tasks, (task, key) ->
# Remove null tasks
unless task?
unless task?.type?
user.del("tasks.#{key}")
# Put rogue tasks back into their lists. We could alternatively delete them (they're rogue because they weren't properly deleted), but that's dangerous
if user.get("#{task.type}Ids").indexOf(task.id) is -1
else if user.get("#{task.type}Ids").indexOf(task.id) is -1
user.push "#{task.type}Ids", task.id
batch = new character.BatchUpdate(model)