Remove more statuses when applying forceDelete #2846

This commit is contained in:
Martin Lensment 2015-08-10 11:27:20 +03:00
parent 1d51d5fdab
commit 147948548f
2 changed files with 42 additions and 2 deletions

View file

@ -539,6 +539,10 @@ class Domain < ActiveRecord::Base
statuses << DomainStatus::PENDING_DELETE
statuses.delete(DomainStatus::CLIENT_DELETE_PROHIBITED)
statuses.delete(DomainStatus::SERVER_DELETE_PROHIBITED)
statuses.delete(DomainStatus::PENDING_UPDATE)
statuses.delete(DomainStatus::PENDING_TRANSFER)
statuses.delete(DomainStatus::PENDING_RENEW)
statuses.delete(DomainStatus::PENDING_CREATE)
self.force_delete_at = Time.zone.now + Setting.redemption_grace_period.days unless force_delete_at
save(validate: false)