diff --git a/app/models/depp/contact.rb b/app/models/depp/contact.rb index d85292bad..0fa9f777a 100644 --- a/app/models/depp/contact.rb +++ b/app/models/depp/contact.rb @@ -230,6 +230,9 @@ module Depp handle_errors(data) end + # rubocop:disable Metrics/CyclomaticComplexity + # rubocop:disable Style/NegatedIf + # rubocop:disable Style/RedundantSelf def extension_xml(action) xml = { _anonymus: [] } @@ -237,7 +240,7 @@ module Depp when :create ident = ident_xml[:_anonymus].try(:first) when :update - # detect if any ident has changed + # detect if any ident has changed, nb! ident and self.ident is not always same if !(ident == self.ident && ident == self.ident_type && ident_country_code == self.ident_country_code) ident = ident_xml[:_anonymus].try(:first) end @@ -248,6 +251,9 @@ module Depp xml[:_anonymus] << legal if legal.present? xml end + # rubocop:enable Metrics/CyclomaticComplexity + # rubocop:enable Style/NegatedIf + # rubocop:enable Style/RedundantSelf def ident_xml { diff --git a/app/models/epp/contact.rb b/app/models/epp/contact.rb index 8054d590b..57bf9192a 100644 --- a/app/models/epp/contact.rb +++ b/app/models/epp/contact.rb @@ -133,6 +133,7 @@ class Epp::Contact < Contact } end + # rubocop:disable Metrics/AbcSize def update_attributes(frame) return super if frame.blank? at = {}.with_indifferent_access @@ -161,6 +162,7 @@ class Epp::Contact < Contact super(at) end + # rubocop:enable Metrics/AbcSize def statuses_attrs(frame, action) status_list = status_list_from(frame)