Story #109367694 - make upID optional to avoid possible error for AdminUser objects have no registar method

This commit is contained in:
Matt Farnsworth 2015-12-03 18:40:13 +02:00
parent c74de1b2bd
commit 01ed0cedb9
2 changed files with 2 additions and 2 deletions

View file

@ -52,7 +52,7 @@ xml.epp_head do
xml.tag!('contact:crDate', @contact.created_at.try(:iso8601))
if @contact.updated_at != @contact.created_at
xml.tag!('contact:upID', @contact.updator.registrar.code)
xml.tag!('contact:upID', @contact.updator.registrar.code) if @contact.updator.try(:registrar).present?
xml.tag!('contact:upDate', @contact.updated_at.try(:iso8601))
end
# xml.tag!('contact:trDate', '123') if false

View file

@ -42,7 +42,7 @@ xml.epp_head do
xml.tag!('domain:crDate', @domain.created_at.try(:iso8601))
if @domain.updated_at != @domain.created_at
xml.tag!('domain:upID', @domain.updator.registrar.code)
xml.tag!('domain:upID', @domain.updator.registrar.code) if @domain.updator.try(:registrar).present?
xml.tag!('domain:upDate', @domain.updated_at.try(:iso8601))
end