mirror of
https://github.com/internetee/registry.git
synced 2025-06-07 21:25:39 +02:00
Attempt to fix renew issues
This commit is contained in:
parent
42adaa7159
commit
aedfeac459
2 changed files with 4 additions and 0 deletions
|
@ -56,6 +56,7 @@ module Domains
|
|||
private
|
||||
|
||||
def add_error
|
||||
domain.add_epp_error(2104, nil, nil, I18n.t(:domain_renew_error_for_domain))
|
||||
errors.add(:domain, I18n.t('domain_renew_error_for_domain', domain: domain.name))
|
||||
end
|
||||
end
|
||||
|
|
|
@ -60,7 +60,10 @@ module Billing
|
|||
def self.price_for(zone, operation_category, duration)
|
||||
lists = valid.where(zone: zone, operation_category: operation_category, duration: duration)
|
||||
return lists.first if lists.count == 1
|
||||
|
||||
lists.order(valid_from: :desc).first
|
||||
rescue ActiveRecord::StatementInvalid
|
||||
nil
|
||||
end
|
||||
|
||||
def name
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue