mirror of
https://github.com/internetee/registry.git
synced 2025-07-21 02:05:57 +02:00
Refactor #2623
This commit is contained in:
parent
4951dbf1ea
commit
0ef04b2506
4 changed files with 17 additions and 10 deletions
|
@ -63,7 +63,6 @@ class Epp::DomainsController < EppController
|
|||
|
||||
def delete
|
||||
authorize! :delete, @domain, @password
|
||||
|
||||
# all includes for bullet
|
||||
@domain = Epp::Domain.where(id: @domain.id).includes(nameservers: :versions).first
|
||||
|
||||
|
|
|
@ -487,6 +487,11 @@ class Epp::Domain < Domain
|
|||
manage_automatic_statuses
|
||||
true # aka 1001 pending_delete
|
||||
else
|
||||
set_pending_delete!
|
||||
end
|
||||
end
|
||||
|
||||
def set_pending_delete!
|
||||
throw :epp_error, {
|
||||
code: '2304',
|
||||
msg: I18n.t(:object_status_prohibits_operation)
|
||||
|
@ -497,7 +502,6 @@ class Epp::Domain < Domain
|
|||
set_server_hold if server_holdable?
|
||||
save(validate: false)
|
||||
end
|
||||
end
|
||||
# rubocop: enable Metrics/PerceivedComplexity
|
||||
# rubocop: enable Metrics/CyclomaticComplexity
|
||||
|
||||
|
|
|
@ -201,6 +201,7 @@ ActiveRecord::Schema.define(version: 20150910113839) do
|
|||
t.integer "legacy_id"
|
||||
t.string "statuses", array: true
|
||||
t.hstore "status_notes"
|
||||
t.integer "legacy_history_id"
|
||||
t.integer "copy_from_id"
|
||||
end
|
||||
|
||||
|
|
|
@ -597,6 +597,7 @@ CREATE TABLE contacts (
|
|||
legacy_id integer,
|
||||
statuses character varying[],
|
||||
status_notes hstore,
|
||||
legacy_history_id integer,
|
||||
copy_from_id integer
|
||||
);
|
||||
|
||||
|
@ -4929,5 +4930,7 @@ INSERT INTO schema_migrations (version) VALUES ('20150810114746');
|
|||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150825125118');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150827151906');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20150910113839');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue