about summary refs log tree commit diff
path: root/app/models/instance.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-03-14 05:27:37 +0100
committerGitHub <noreply@github.com>2022-03-14 05:27:37 +0100
commit5db1f377ea2735778d2d3004d2af268fdcafff4a (patch)
tree3d96a607a1d19c6d8406872670a434fcb99ac3f8 /app/models/instance.rb
parent74f406cfc97a8e9fcdfd6f040d2e6e6360b782f8 (diff)
Fix nil error when viewing suspended domain in admin UI (#17765)
Diffstat (limited to 'app/models/instance.rb')
-rw-r--r--app/models/instance.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/instance.rb b/app/models/instance.rb
index c01c23077..36110ee40 100644
--- a/app/models/instance.rb
+++ b/app/models/instance.rb
@@ -32,8 +32,12 @@ class Instance < ApplicationRecord
     @delivery_failure_tracker ||= DeliveryFailureTracker.new(domain)
   end
 
+  def purgeable?
+    unavailable? || domain_block&.suspend?
+  end
+
   def unavailable?
-    unavailable_domain.present? || domain_block&.suspend?
+    unavailable_domain.present?
   end
 
   def failing?