From d9bd25e11436b52b8db129346643767292ccd92a Mon Sep 17 00:00:00 2001 From: Dan Hansen & Sarah Mei Date: Mon, 21 Nov 2011 21:39:26 -0800 Subject: [PATCH] Only repopulate cache on contact destroy if user exists --- app/models/contact.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/contact.rb b/app/models/contact.rb index 824cc25dc..518b11e89 100644 --- a/app/models/contact.rb +++ b/app/models/contact.rb @@ -45,7 +45,7 @@ class Contact < ActiveRecord::Base end def repopulate_cache! - if RedisCache.configured? + if RedisCache.configured? && self.user.present? cache = RedisCache.new(self.user) cache.repopulate! end