diff --git a/app/controllers/admin/domains_controller.rb b/app/controllers/admin/domains_controller.rb index 6829d506b..9b64aa72c 100644 --- a/app/controllers/admin/domains_controller.rb +++ b/app/controllers/admin/domains_controller.rb @@ -54,8 +54,8 @@ module Admin @domain.is_admin = true @domain.admin_status_update dp[:statuses] if @domain.update(dp) - @domain.admin_store_statuses_history = @domain.statuses - @domain.save + # @domain.admin_store_statuses_history = @domain.statuses + # @domain.save flash[:notice] = I18n.t('domain_updated') redirect_to [:admin, @domain] else diff --git a/app/models/concerns/domain/registry_lockable.rb b/app/models/concerns/domain/registry_lockable.rb index ecca7d737..4f9340aaf 100644 --- a/app/models/concerns/domain/registry_lockable.rb +++ b/app/models/concerns/domain/registry_lockable.rb @@ -55,6 +55,4 @@ module Domain::RegistryLockable attached_obj_type: self.class.name ) end - - private end diff --git a/app/models/domain.rb b/app/models/domain.rb index fcf4d8d58..43001deef 100644 --- a/app/models/domain.rb +++ b/app/models/domain.rb @@ -558,8 +558,8 @@ class Domain < ApplicationRecord # special handling for admin changing status def admin_status_update(update) # check for deleted status - self.admin_store_statuses_history = statuses + update(admin_store_statuses_history: update) statuses.each do |s| unless update.include? s case s diff --git a/app/models/registrant_user.rb b/app/models/registrant_user.rb index c6d80901e..f7e85c5af 100644 --- a/app/models/registrant_user.rb +++ b/app/models/registrant_user.rb @@ -17,11 +17,11 @@ class RegistrantUser < User Country.new(alpha2_code) end - def companies(company_register = nil) + def companies(company_register = CompanyRegister::Client.new) return [] if ident.include?('-') - [OpenStruct.new(registration_number: '43344412', company_name: 'TestFirma'), - OpenStruct.new(registration_number: '12345678', company_name: 'SuperFirma OU')] + company_register.representation_rights(citizen_personal_code: ident, + citizen_country_code: country.alpha3) end def contacts(representable: true)