mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 05:34:46 +02:00
fixed ArgumentError
This commit is contained in:
parent
c771902780
commit
62d1ba45a2
8 changed files with 10 additions and 12 deletions
|
@ -74,7 +74,7 @@ module Repp
|
|||
render_epp_error
|
||||
end
|
||||
|
||||
def render_epp_error(status = :bad_request, data = {})
|
||||
def render_epp_error(status = :bad_request, **data)
|
||||
@epp_errors ||= ActiveModel::Errors.new(self)
|
||||
@epp_errors.add(:epp_errors, msg: 'Command failed', code: '2304') if data != {}
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ module Repp
|
|||
return
|
||||
end
|
||||
|
||||
render_success(create_update_success_body)
|
||||
render_success(**create_update_success_body)
|
||||
end
|
||||
|
||||
api :PUT, '/repp/v1/contacts/:contact_code'
|
||||
|
|
|
@ -11,9 +11,7 @@ module Domains
|
|||
renewed_expire_time = prepare_renewed_expire_time
|
||||
in_transaction_with_retries do
|
||||
check_balance
|
||||
success = domain.renew(renewed_expire_time: renewed_expire_time,
|
||||
period: period,
|
||||
unit: unit)
|
||||
success = domain.renew(renewed_expire_time, period, unit)
|
||||
if success
|
||||
check_balance
|
||||
reduce_balance
|
||||
|
|
|
@ -8,13 +8,13 @@ class DomainExpireEmailJob < ApplicationJob
|
|||
attrs = {
|
||||
domain: domain,
|
||||
registrar: domain.registrar,
|
||||
email: email,
|
||||
email: email
|
||||
}
|
||||
|
||||
if domain.force_delete_scheduled?
|
||||
DomainExpireMailer.expired_soft(attrs).deliver_now
|
||||
DomainExpireMailer.expired_soft(**attrs).deliver_now
|
||||
else
|
||||
DomainExpireMailer.expired(attrs).deliver_now
|
||||
DomainExpireMailer.expired(**attrs).deliver_now
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -173,7 +173,7 @@ class Epp::Domain < Domain
|
|||
|
||||
### RENEW ###
|
||||
|
||||
def renew(renewed_expire_time:, period:, unit:)
|
||||
def renew(renewed_expire_time, period, unit)
|
||||
@is_renewal = true
|
||||
|
||||
add_renew_epp_errors unless renewable?
|
||||
|
|
|
@ -7,6 +7,6 @@ class DomainNameserverValidator < ActiveModel::EachValidator
|
|||
|
||||
return if values.size.between?(min, max)
|
||||
association = options[:association] || attribute
|
||||
record.errors.add(association, :out_of_range, { min: min, max: max })
|
||||
record.errors.add(association, :out_of_range, **{ min: min, max: max })
|
||||
end
|
||||
end
|
||||
|
|
|
@ -5,6 +5,6 @@ class ObjectCountValidator < ActiveModel::EachValidator
|
|||
|
||||
return if values.size.between?(min, max)
|
||||
association = options[:association] || attribute
|
||||
record.errors.add(association, :out_of_range, { min: min, max: max })
|
||||
record.errors.add(association, :out_of_range, **{ min: min, max: max })
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,7 +6,7 @@ module I18n
|
|||
|
||||
def localize(object, options = {})
|
||||
options.merge!({ default: '-' })
|
||||
object.present? ? original_localize(object, options) : ''
|
||||
object.present? ? original_localize(object, **options) : ''
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue