Merge branch 'staging' of github.com:internetee/registry into staging

# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
This commit is contained in:
Stas 2015-11-17 16:51:46 +02:00
parent 360fb57a68
commit 2dddace1b8
12 changed files with 97 additions and 55 deletions

View file

@ -478,7 +478,7 @@ class Epp::Domain < Domain
# rubocop: enable Metrics/CyclomaticComplexity
def apply_pending_update!
old_registrant_email = DomainMailer.registrant_updated_notification_for_old_registrant(self)
old_registrant_email = DomainMailer.registrant_updated_notification_for_old_registrant(id)
preclean_pendings
user = ApiUser.find(pending_json['current_user_id'])
frame = Nokogiri::XML(pending_json['frame'])
@ -488,8 +488,8 @@ class Epp::Domain < Domain
return unless update(frame, user, false)
clean_pendings!
self.deliver_emails = true # turn on email delivery
DomainMailer.registrant_updated_notification_for_new_registrant(self).deliver_now
old_registrant_email.deliver_now
DomainMailer.registrant_updated_notification_for_new_registrant(id).deliver
old_registrant_email.deliver
true
end
@ -497,7 +497,7 @@ class Epp::Domain < Domain
preclean_pendings
statuses.delete(DomainStatus::PENDING_DELETE_CONFIRMATION)
statuses.delete(DomainStatus::PENDING_DELETE)
DomainMailer.delete_confirmation(self).deliver_now
DomainMailer.delete_confirmation(id).deliver
# TODO: confirm that this actually makes sense
clean_pendings! if valid? && set_pending_delete!