mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 18:56:05 +02:00
added test and saving statuses into histroy field
This commit is contained in:
parent
622dba4f1c
commit
09eab21d2b
9 changed files with 34 additions and 183 deletions
|
@ -122,7 +122,7 @@ class Domain < ApplicationRecord
|
|||
def status_is_consistant
|
||||
has_error = (hold_status? && statuses.include?(DomainStatus::SERVER_MANUAL_INZONE))
|
||||
if !has_error && (statuses & DELETE_STATUSES).any?
|
||||
has_error = statuses.include? DomainStatus::SERVER_DELETE_PROHIBITED
|
||||
has_error = statuses.include? DomainStatus::SERVER_DELETE_PROHIBITED unless locked_by_registrant?
|
||||
end
|
||||
errors.add(:domains, I18n.t(:object_status_prohibits_operation)) if has_error
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue