Query address mandatoryness via Contact.address_processing?

This commit is contained in:
Karl Erik Õunapuu 2020-08-10 16:04:02 +03:00
parent 625bd459de
commit 8f8b246e49
2 changed files with 2 additions and 2 deletions

View file

@ -23,7 +23,7 @@ module Actions
end end
def maybe_remove_address def maybe_remove_address
return if Setting.address_processing? return if Contact.address_processing?
new_attributes.delete(:city) new_attributes.delete(:city)
new_attributes.delete(:zip) new_attributes.delete(:zip)

View file

@ -62,7 +62,7 @@ class Contact < ApplicationRecord
mapping: [%w[ident code], %w[ident_type type], %w[ident_country_code country_code]] mapping: [%w[ident code], %w[ident_type type], %w[ident_country_code country_code]]
after_save :update_related_whois_records after_save :update_related_whois_records
before_save :clear_address_modifications, if: -> { !self.class.address_processing? } before_validation :clear_address_modifications, if: -> { !self.class.address_processing? }
self.ignored_columns = %w[legacy_id legacy_history_id] self.ignored_columns = %w[legacy_id legacy_history_id]