Merge pull request #748 from internetee/registry-731

Do not validate Contact#country_code if address processing is off
This commit is contained in:
Timo Võhmar 2018-03-02 15:03:55 +02:00 committed by GitHub
commit b331c8003d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 1 deletions

View file

@ -37,7 +37,7 @@ class Contact < ActiveRecord::Base
validates_associated :identifier
validate :validate_html
validate :validate_country_code
validate :validate_country_code, if: 'self.class.address_processing?'
after_initialize do
self.status_notes = {} if status_notes.nil?