mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 08:22:05 +02:00
comment out force delete check callback
This commit is contained in:
parent
43bd6f2907
commit
bc0a9d4f99
4 changed files with 89 additions and 92 deletions
|
@ -44,17 +44,16 @@ class VerifyEmailsJob < ApplicationJob
|
|||
|
||||
def filter_check_level(contact)
|
||||
return true unless contact.validation_events.exists?
|
||||
|
||||
|
||||
data = contact.validation_events.order(created_at: :asc).last
|
||||
|
||||
return true if data.successful? && data.created_at < (Time.zone.now - ValidationEvent::VALIDATION_PERIOD)
|
||||
|
||||
|
||||
if data.failed?
|
||||
return false if data.event_data['check_level'] == 'regex'
|
||||
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
false
|
||||
end
|
||||
end
|
||||
|
|
|
@ -35,7 +35,7 @@ class ValidationEvent < ApplicationRecord
|
|||
scope :smtp, -> { where('event_data @> ?', { 'check_level': 'smtp' }.to_json) }
|
||||
scope :by_object, ->(object) { where(validation_eventable: object) }
|
||||
|
||||
after_create :check_for_force_delete
|
||||
# after_create :check_for_force_delete
|
||||
|
||||
def self.validated_ids_by(klass)
|
||||
recent.successful.where('validation_eventable_type = ?', klass)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue