mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 09:57:23 +02:00
Fix blank domain name find bug
This commit is contained in:
parent
cee79625c0
commit
c0251f7028
1 changed files with 3 additions and 2 deletions
|
@ -167,13 +167,14 @@ module Epp::DomainsHelper
|
||||||
|
|
||||||
## SHARED
|
## SHARED
|
||||||
def find_domain(secure = { secure: true })
|
def find_domain(secure = { secure: true })
|
||||||
domain = Epp::EppDomain.find_by(name: @ph[:name].strip.downcase)
|
domain_name = parsed_frame.css('name').text.strip.downcase
|
||||||
|
domain = Epp::EppDomain.find_by(name: domain_name)
|
||||||
|
|
||||||
unless domain
|
unless domain
|
||||||
epp_errors << {
|
epp_errors << {
|
||||||
code: '2303',
|
code: '2303',
|
||||||
msg: I18n.t('errors.messages.epp_domain_not_found'),
|
msg: I18n.t('errors.messages.epp_domain_not_found'),
|
||||||
value: { obj: 'name', val: @ph[:name].strip.downcase }
|
value: { obj: 'name', val: domain_name }
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue