mirror of
https://github.com/internetee/registry.git
synced 2025-05-20 03:09:36 +02:00
Merge branch '106012880-pricelists' into staging
This commit is contained in:
commit
7af817104d
1 changed files with 10 additions and 0 deletions
|
@ -28,6 +28,11 @@ class Epp::DomainsController < EppController
|
|||
@domain.errors.delete(:name_dirty) if @domain.errors[:puny_label].any?
|
||||
handle_errors(@domain) and return if @domain.errors.any?
|
||||
|
||||
if !@domain_pricelist.try(:price)#checking if pricelist is not found
|
||||
@domain.add_epp_error('2306', nil, nil, 'No price list for domain')
|
||||
handle_errors(@domain) and return if @domain.errors.any?
|
||||
end
|
||||
|
||||
handle_errors and return unless balance_ok?('create')
|
||||
ActiveRecord::Base.transaction do
|
||||
if @domain.save # TODO: Maybe use validate: false here because we have already validated the domain?
|
||||
|
@ -100,6 +105,11 @@ class Epp::DomainsController < EppController
|
|||
period = (period_element.to_i == 0) ? 1 : period_element.to_i
|
||||
period_unit = Epp::Domain.parse_period_unit_from_frame(params[:parsed_frame]) || 'y'
|
||||
|
||||
if !@domain_pricelist.try(:price)#checking if pricelist is not found
|
||||
@domain.add_epp_error('2306', nil, nil, 'No price list for domain')
|
||||
handle_errors(@domain) and return if @domain.errors.any?
|
||||
end
|
||||
|
||||
ActiveRecord::Base.transaction do
|
||||
success = @domain.renew(
|
||||
params[:parsed_frame].css('curExpDate').text,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue