Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save jlsherrill/aee22b25d7e9721e1266f269a31627c4 to your computer and use it in GitHub Desktop.

Select an option

Save jlsherrill/aee22b25d7e9721e1266f269a31627c4 to your computer and use it in GitHub Desktop.
deleting missing products
foreman-rake console
> Katello::Product.select{|p| p.productContent.nil? rescue true}.count
3
> Katello::Product.select{|p| p.productContent.nil? rescue true}.map(&:name)
Look at list of products
> Katello::Product.select{|p| p.productContent.nil? rescue true}.each{|p| p.destroy!}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment