mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 17:28:18 +02:00
Tech replace: Skip if domain has update prohibited
This commit is contained in:
parent
44226aa5d6
commit
5693d0dd74
2 changed files with 7 additions and 2 deletions
|
@ -6,7 +6,7 @@ class TechDomainContact < DomainContact
|
|||
tech_contacts = where(contact: current_contact)
|
||||
|
||||
tech_contacts.each do |tech_contact|
|
||||
if tech_contact.domain.bulk_update_prohibited?
|
||||
if irreplaceable?(tech_contact)
|
||||
skipped_domains << tech_contact.domain.name
|
||||
next
|
||||
end
|
||||
|
@ -20,4 +20,9 @@ class TechDomainContact < DomainContact
|
|||
end
|
||||
[affected_domains.sort, skipped_domains.sort]
|
||||
end
|
||||
|
||||
def self.irreplaceable?(tech_contact)
|
||||
dn = tech_contact.domain
|
||||
dn.bulk_update_prohibited? || dn.update_prohibited? || dn.tech_change_prohibited?
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue