Remove clean_pendings_lowlevel method

This commit is contained in:
Maciej Szlosarczyk 2018-06-26 11:37:31 +03:00
parent a8884b0545
commit 8fb3d511c2
No known key found for this signature in database
GPG key ID: 41D62D42D3B0D765
3 changed files with 7 additions and 32 deletions

View file

@ -294,36 +294,6 @@ class Domain < ActiveRecord::Base
save
end
# 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)
statuses.delete(DomainStatus::PENDING_DELETE)
status_notes[DomainStatus::PENDING_UPDATE] = ''
status_notes[DomainStatus::PENDING_DELETE] = ''
hash = {
registrant_verification_token: nil,
registrant_verification_asked_at: nil,
pending_json: {},
status_notes: status_notes,
statuses: statuses.presence || [DomainStatus::OK],
# need this column in order to update PaperTrail version properly
updated_at: Time.now.utc
}
# PaperTrail
self.attributes = hash
record_update
clear_version_instance!
reset_transaction_id
update_columns(hash)
end
def pending_update!
return true if pending_update?
self.epp_pending_update = true # for epp