From b4f834e33a9aea202e8b667538c1455e249976b4 Mon Sep 17 00:00:00 2001 From: Matt Farnsworth Date: Mon, 14 Dec 2015 11:27:18 +0200 Subject: [PATCH] Story #109367694 - use cr_id in EPP info response --- app/views/epp/contacts/info.xml.builder | 6 +----- app/views/epp/domains/info.xml.builder | 6 +----- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/app/views/epp/contacts/info.xml.builder b/app/views/epp/contacts/info.xml.builder index 5b501fc75..39aa91b39 100644 --- a/app/views/epp/contacts/info.xml.builder +++ b/app/views/epp/contacts/info.xml.builder @@ -48,11 +48,7 @@ xml.epp_head do xml.tag!('contact:clID', @contact.registrar.try(:code)) - # EPP requires a creator ID, which should be registrar code if we have one - crID = @contact.creator.try(:registrar) - crID = crID.code if crID.present? # Did creator return a kind of User that has a registrar? - crID = @contact.creator unless crID.present? # Fallback if we failed, maybe this is a string only - xml.tag!('contact:crID', crID) + xml.tag!('contact:crID', @contact.cr_id) xml.tag!('contact:crDate', @contact.created_at.try(:iso8601)) if @contact.updated_at != @contact.created_at diff --git a/app/views/epp/domains/info.xml.builder b/app/views/epp/domains/info.xml.builder index 11ab2441f..ec5947b13 100644 --- a/app/views/epp/domains/info.xml.builder +++ b/app/views/epp/domains/info.xml.builder @@ -38,11 +38,7 @@ xml.epp_head do xml.tag!('domain:clID', @domain.registrar.code) - # EPP requires a creator ID, which should be registrar code if we have one - crID = @domain.creator.try(:registrar) - crID = crID.code if crID.present? # Did creator return a kind of User that has a registrar? - crID = @domain.creator unless crID.present? # Fallback if we failed, maybe this is a string only - xml.tag!('domain:crID', crID) + xml.tag!('domain:crID', @domain.cr_id) xml.tag!('domain:crDate', @domain.created_at.try(:iso8601)) if @domain.updated_at != @domain.created_at