do not store GroupOrderArticles with zero quantity and tolerance

This commit is contained in:
wvengen 2014-03-18 17:29:40 +01:00
parent ce0ee6773a
commit 25854f2de7
4 changed files with 22 additions and 7 deletions

View file

@ -0,0 +1,9 @@
class DeleteEmptyGroupOrderArticles < ActiveRecord::Migration
def up
# up until recently, group_order_articles with all quantities zero were saved
GroupOrderArticle.where(quantity: 0, tolerance: 0, result: [0, nil], result_computed: [0, nil]).delete_all
end
def down
end
end