mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 10:49:39 +02:00
1098188884-outzone_clear
This commit is contained in:
parent
47dcca06ba
commit
fe771af0ae
1 changed files with 12 additions and 0 deletions
|
@ -704,6 +704,18 @@ class Domain < ActiveRecord::Base
|
|||
|
||||
# special handling for admin changing status
|
||||
def admin_status_update(update)
|
||||
#check for hold status
|
||||
if self.statuses.include?(
|
||||
DomainStatus::SERVER_HOLD) &&
|
||||
!update.include?(DomainStatus::SERVER_HOLD)
|
||||
|
||||
if self.statuses.include?(DomainStatus::EXPIRED)
|
||||
self.outzone_at = Time.zone.now
|
||||
else
|
||||
self.outzone_at = nil
|
||||
end
|
||||
end
|
||||
|
||||
# check for deleted status
|
||||
statuses.each do |s|
|
||||
unless update.include? s
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue