Skip to content

Commit

Permalink
Add a bit more error checking
Browse files Browse the repository at this point in the history
  • Loading branch information
gabebw committed Dec 8, 2010
1 parent 2539e53 commit d85b2a0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/thinkingtank/tasks.rb
Expand Up @@ -28,7 +28,9 @@ def load_models

def reindex_models
it = ThinkingTank::Configuration.instance.client
if it.exists?
if it.exists? and it.code
# Check for code because it.exists? may return true for a
# nonexistent index
puts "Deleting existing index"
it.delete_index()
end
Expand Down

0 comments on commit d85b2a0

Please sign in to comment.