mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 19:20:37 +02:00
Query address mandatoryness via Contact.address_processing?
This commit is contained in:
parent
625bd459de
commit
8f8b246e49
2 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||||
|
|
|
@ -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]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue