Remove old country from contact controller

This commit is contained in:
Priit Tark 2015-02-03 13:30:49 +02:00
parent 2117cb62c2
commit cddf93ce1c

View file

@ -115,11 +115,7 @@ class Epp::ContactsController < EppController
## SHARED ## SHARED
def find_contact(eager_load = nil) def find_contact(eager_load = nil)
if eager_load contact = Contact.find_by(code: @ph[:id])
contact = Contact.includes(address: :country).find_by(code: @ph[:id])
else
contact = Contact.find_by(code: @ph[:id])
end
unless contact unless contact
epp_errors << { code: '2303', epp_errors << { code: '2303',
msg: t('errors.messages.epp_obj_does_not_exist'), msg: t('errors.messages.epp_obj_does_not_exist'),