mirror of
https://github.com/internetee/registry.git
synced 2025-08-02 16:02:03 +02:00
Add force delete message to poll #2882
This commit is contained in:
parent
fbd281007c
commit
827e3f8a0d
6 changed files with 30 additions and 4 deletions
|
@ -577,7 +577,14 @@ class Domain < ActiveRecord::Base
|
|||
end
|
||||
|
||||
self.force_delete_at = Time.zone.now + Setting.redemption_grace_period.days unless force_delete_at
|
||||
save(validate: false)
|
||||
transaction do
|
||||
save!(validate: false)
|
||||
registrar.messages.create!(
|
||||
body: I18n.t('force_delete_set_on_domain', domain: name)
|
||||
)
|
||||
return true
|
||||
end
|
||||
false
|
||||
end
|
||||
# rubocop:enable Metrics/AbcSize
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue