mirror of
https://github.com/internetee/registry.git
synced 2025-08-05 09:21:43 +02:00
fixed codeclimate errors
This commit is contained in:
parent
f4e0084895
commit
e7e3278267
44 changed files with 118 additions and 150 deletions
|
@ -98,8 +98,8 @@ class Epp::Contact < Contact
|
|||
return unless legal_document_data
|
||||
|
||||
legal_documents.create(
|
||||
document_type: legal_document_data[:type],
|
||||
body: legal_document_data[:body]
|
||||
document_type: legal_document_data[:type],
|
||||
body: legal_document_data[:body]
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -108,9 +108,9 @@ class Epp::Contact < Contact
|
|||
return unless legal_document_data
|
||||
|
||||
doc = LegalDocument.create(
|
||||
documentable_type: Contact,
|
||||
document_type: legal_document_data[:type],
|
||||
body: legal_document_data[:body]
|
||||
documentable_type: Contact,
|
||||
document_type: legal_document_data[:type],
|
||||
body: legal_document_data[:body]
|
||||
)
|
||||
self.legal_documents = [doc]
|
||||
|
||||
|
|
|
@ -144,8 +144,8 @@ class Epp::Domain < Domain
|
|||
return
|
||||
end
|
||||
|
||||
if doc = attach_legal_document(::Deserializers::Xml::LegalDocument.new(frame).call)
|
||||
frame.css("legalDocument").first.content = doc.path if doc&.persisted?
|
||||
if doc = attach_legal_document(::Deserializers::Xml::LegalDocument.new(frame).call) && doc&.persisted?
|
||||
frame.css("legalDocument").first.content = doc.path
|
||||
end
|
||||
|
||||
if Setting.request_confirmation_on_domain_deletion_enabled &&
|
||||
|
@ -325,11 +325,13 @@ class Epp::Domain < Domain
|
|||
return false
|
||||
end
|
||||
|
||||
begin
|
||||
errors.add(:base, :domain_status_prohibits_operation)
|
||||
return false
|
||||
end if (statuses &
|
||||
if (statuses &
|
||||
[DomainStatus::CLIENT_DELETE_PROHIBITED, DomainStatus::SERVER_DELETE_PROHIBITED]).any?
|
||||
begin
|
||||
errors.add(:base, :domain_status_prohibits_operation)
|
||||
return false
|
||||
end
|
||||
end
|
||||
|
||||
true
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue