From e4c00e6bcee25144c726ea3fe3ce7fdbb1245da5 Mon Sep 17 00:00:00 2001 From: Vladimir Krylov Date: Fri, 18 Dec 2015 15:48:00 +0200 Subject: [PATCH] Story#109623634 - after contact transferring it should be linked and ok --- app/models/contact.rb | 6 ++++++ app/models/epp/domain.rb | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/models/contact.rb b/app/models/contact.rb index fcebe8632..bcd359ca9 100644 --- a/app/models/contact.rb +++ b/app/models/contact.rb @@ -57,6 +57,11 @@ class Contact < ActiveRecord::Base before_save :manage_statuses def manage_statuses + if domain_transfer # very ugly but need better workflow + self.statuses = [OK, LINKED] + return + end + manage_linked manage_ok end @@ -78,6 +83,7 @@ class Contact < ActiveRecord::Base ] attr_accessor :deliver_emails + attr_accessor :domain_transfer # hack but solves problem faster # # STATUSES diff --git a/app/models/epp/domain.rb b/app/models/epp/domain.rb index 26f0c3153..fac09705d 100644 --- a/app/models/epp/domain.rb +++ b/app/models/epp/domain.rb @@ -622,7 +622,7 @@ class Epp::Domain < Domain oc.registrar_id = registrar_id oc.copy_from_id = c.id oc.prefix_code - oc.domains_present = true + oc.domain_transfer = true oc.save!(validate: false) oc end