Add condition on not having clientHold status for force-delete job

See #1480
This commit is contained in:
Alex Sherman 2020-01-20 17:06:37 +05:00
parent b3e5e477ad
commit a7b4b0d19b
4 changed files with 26 additions and 2 deletions

View file

@ -25,7 +25,8 @@ module Concerns::Domain::ForceDelete # rubocop:disable Metrics/ModuleLength
def should_notify_on_soft_force_delete?
force_delete_scheduled? && contact_notification_sent_date.blank? &&
force_delete_start.to_date <= Time.zone.now.to_date && force_delete_type.to_sym == :soft
force_delete_start.to_date <= Time.zone.now.to_date && force_delete_type.to_sym == :soft &&
!statuses.include?(DomainStatus::CLIENT_HOLD)
end
def client_holdable?