Skip to content

Commit

Permalink
Do not nullify binary_blob on miq_queue destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
agrare committed Dec 20, 2017
1 parent b261489 commit 6449ac2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/models/binary_blob/purging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def purge_window_size
end

def purge_scope(_older_than = nil)
where(:resource => nil)
where(:resource_type => 'MiqQueue').where.not('resource_id in (select id from miq_queue)')
end

def purge_associated_records(ids)
Expand Down
2 changes: 1 addition & 1 deletion app/models/miq_queue.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#
class MiqQueue < ApplicationRecord
belongs_to :handler, :polymorphic => true
has_many :binary_blobs, :as => :resource, :dependent => :nullify
has_many :binary_blobs, :as => :resource

attr_accessor :last_exception

Expand Down

0 comments on commit 6449ac2

Please sign in to comment.