Refactored contact to return onyl one error message requested from ticket #2702

This commit is contained in:
Priit Tark 2015-08-17 18:40:58 +03:00
parent 8bffdbf783
commit cdfb4ed0d1
5 changed files with 73 additions and 190 deletions

View file

@ -123,12 +123,6 @@ class Epp::ContactsController < EppController
def validate_update
@prefix = 'update > update >'
if element_count('chg') == 0 && element_count('rem') == 0 && element_count('add') == 0
epp_errors << {
code: '2003',
msg: I18n.t('errors.messages.required_parameter_missing', key: 'add, rem or chg')
}
end
contact_org_disabled
fax_disabled
status_editing_disabled
@ -148,6 +142,7 @@ class Epp::ContactsController < EppController
def contact_org_disabled
return true if ENV['contact_org_enabled'] == 'true'
return true if params[:parsed_frame].css('postalInfo org').text.blank?
epp_errors << {
code: '2306',
msg: "#{I18n.t(:contact_org_error)}: postalInfo > org [org]"