Skip contact validation on transfer #2595

This commit is contained in:
Martin Lensment 2015-06-03 10:54:35 +03:00
parent 537e4c1acf
commit 2132489026

View file

@ -467,7 +467,7 @@ class Epp::Domain < Domain
oc = c.deep_clone include: [:statuses] oc = c.deep_clone include: [:statuses]
oc.code = nil oc.code = nil
oc.registrar_id = registrar_id oc.registrar_id = registrar_id
oc.save! oc.save!(validate: false)
oc oc
end end
@ -475,7 +475,7 @@ class Epp::Domain < Domain
oc = Contact.find(contact_id) # n+1 workaround oc = Contact.find(contact_id) # n+1 workaround
oc.registrar_id = registrar_id oc.registrar_id = registrar_id
oc.generate_new_code! oc.generate_new_code!
oc.save! oc.save!(validate: false)
oc oc
end end
@ -548,9 +548,10 @@ class Epp::Domain < Domain
save!(validate: false) save!(validate: false)
return dt return dt
rescue => _e rescue => e
add_epp_error('2306', nil, nil, I18n.t('action_failed_due_to_server_error')) add_epp_error('2306', nil, nil, I18n.t('action_failed_due_to_server_error'))
logger.error(_e) logger.error('DOMAIN TRANSFER FAILED')
logger.error(e)
raise ActiveRecord::Rollback raise ActiveRecord::Rollback
end end
end end