From 4745eca4ada29d7e44b7475ce08e2b962df0f87c Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 4 May 2015 11:37:49 -0400 Subject: [PATCH] FIX: Don't abort PurgeInactive if they have posts. Just skip. --- app/models/user.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 0660f0bc0f..96700fa2aa 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -887,7 +887,7 @@ class User < ActiveRecord::Base to_destroy.each do |u| begin destroyer.destroy(u, context: I18n.t(:purge_reason)) - rescue Discourse::InvalidAccess + rescue Discourse::InvalidAccess, UserDestroyer::PostsExistError # if for some reason the user can't be deleted, continue on to the next one end end