Skip to content

Commit

Permalink
[api] speed up package indexing for non-products
Browse files Browse the repository at this point in the history
solves also a crash in delayed job when package got removed again
  • Loading branch information
adrianschroeter committed Jul 22, 2014
1 parent 3a793be commit 59c5dd1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/api/app/models/package.rb
Expand Up @@ -486,6 +486,11 @@ def update_channel_list
end

def update_product_list
# short cut to ensure that no products are left over
unless self.is_product?
self.products.delete_all
return
end

# hash existing entries
old = Hash.new
Expand Down

0 comments on commit 59c5dd1

Please sign in to comment.