diff --git a/lib/tasks/restore.rake b/lib/tasks/restore.rake index 0dc8cf11..20e0d914 100644 --- a/lib/tasks/restore.rake +++ b/lib/tasks/restore.rake @@ -99,8 +99,6 @@ namespace "cms" do puts("There was a problem rebuilding domain file instances - importing domain anyway") end - SiteTemplate.find(:all).map(&:save) - SiteFeature.find(:all).map(&:save) if(File.exists?(directory + "/storage.tar.gz")) @@ -125,6 +123,13 @@ namespace "cms" do DomainFile.update_all "server_hash = '#{server_hash}'", 'file_type != "fld" and server_hash IS NULL' end + begin + SiteTemplate.find(:all).map(&:save) + SiteFeature.find(:all).map(&:save) + rescue Exception => e + puts("There was a problem resaving site templates and features - continuing import anyway") + end + # Clear out the cache for the domain DataCache.expire_domain(dmn.database)