Merge pull request #157 from internetee/story/117612931-contact-whois

Story#117612931 - contact touch is not regenerating all whoises once …
This commit is contained in:
Timo Võhmar 2016-07-06 17:18:21 +03:00 committed by GitHub
commit b1baf93033

View file

@ -562,6 +562,9 @@ class Contact < ActiveRecord::Base
end end
def update_related_whois_records def update_related_whois_records
# not doing anything if no real changes
return if changes.slice(*(self.class.column_names - ["updated_at", "created_at", "statuses", "status_notes"])).empty?
names = related_domain_descriptions.keys names = related_domain_descriptions.keys
UpdateWhoisRecordJob.enqueue(names, :domain) if names.present? UpdateWhoisRecordJob.enqueue(names, :domain) if names.present?
end end