mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 00:42:04 +02:00
Story#115405945 - clean_pendings_lowlevel saves history
This commit is contained in:
parent
2c059f9176
commit
03b58f7386
1 changed files with 12 additions and 3 deletions
|
@ -345,7 +345,8 @@ class Domain < ActiveRecord::Base
|
|||
end
|
||||
|
||||
|
||||
# state change shouln't be
|
||||
# state changes may be done low-level - no validation
|
||||
# in this metod we still save PaperTrail log.
|
||||
def clean_pendings_lowlevel
|
||||
statuses.delete(DomainStatus::PENDING_DELETE_CONFIRMATION)
|
||||
statuses.delete(DomainStatus::PENDING_UPDATE)
|
||||
|
@ -354,13 +355,21 @@ class Domain < ActiveRecord::Base
|
|||
status_notes[DomainStatus::PENDING_UPDATE] = ''
|
||||
status_notes[DomainStatus::PENDING_DELETE] = ''
|
||||
|
||||
update_columns(
|
||||
hash = {
|
||||
registrant_verification_token: nil,
|
||||
registrant_verification_asked_at: nil,
|
||||
pending_json: {},
|
||||
status_notes: status_notes,
|
||||
statuses: statuses.presence || [DomainStatus::OK]
|
||||
)
|
||||
}
|
||||
|
||||
# papertrail
|
||||
self.attributes = hash
|
||||
record_create
|
||||
clear_version_instance!
|
||||
reset_transaction_id
|
||||
|
||||
update_columns(hash)
|
||||
end
|
||||
|
||||
def pending_update!
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue