From b59360a003af595f1552f2ce753d4d80e5cf0028 Mon Sep 17 00:00:00 2001 From: elijah Date: Wed, 10 Dec 2014 15:05:34 -0800 Subject: silently ignore 404 errors when trying to delete all user tickets: the tickets db might not yet be initialized. --- engines/support/app/models/ticket.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engines/support') diff --git a/engines/support/app/models/ticket.rb b/engines/support/app/models/ticket.rb index 161507c..554fbd6 100644 --- a/engines/support/app/models/ticket.rb +++ b/engines/support/app/models/ticket.rb @@ -50,6 +50,8 @@ class Ticket < CouchRest::Model::Base self.by_created_by.key(user.id).each do |ticket| ticket.destroy end + rescue RestClient::ResourceNotFound + # silently ignore if design docs are not yet created end def is_creator_validated? -- cgit v1.2.3