From fa5203d0a1292d937a0c81dec04a545ffb37d2bb Mon Sep 17 00:00:00 2001 From: dinsmol Date: Wed, 15 Dec 2021 17:31:53 +0300 Subject: [PATCH] Fix domain statuses logic --- app/models/domain.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/domain.rb b/app/models/domain.rb index f5372e29b..2bab00eab 100644 --- a/app/models/domain.rb +++ b/app/models/domain.rb @@ -121,8 +121,8 @@ class Domain < ApplicationRecord validate :status_is_consistant 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 unless locked_by_registrant? + if !has_error && statuses.include?(DomainStatus::PENDING_DELETE) + has_error = statuses.include? DomainStatus::SERVER_DELETE_PROHIBITED end errors.add(:domains, I18n.t(:object_status_prohibits_operation)) if has_error end