mirror of
https://github.com/internetee/registry.git
synced 2025-08-15 22:13:54 +02:00
refactoring
This commit is contained in:
parent
5f8660adec
commit
7fbbdcb5a3
3 changed files with 0 additions and 26 deletions
|
@ -24,13 +24,11 @@ module Repp
|
|||
|
||||
@certificate = @api_user.certificates.build(csr: csr)
|
||||
|
||||
# Проверяем наличие CSR
|
||||
if csr.blank?
|
||||
@certificate.errors.add(:base, I18n.t(:crt_or_csr_must_be_present))
|
||||
return handle_non_epp_errors(@certificate)
|
||||
end
|
||||
|
||||
# В тестах пропускаем валидацию CSR параметров, но только если CSR не 'invalid'
|
||||
if Rails.env.test? && cert_params[:csr][:body] != 'invalid'
|
||||
result = @certificate.save(validate: false)
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue