do not store GroupOrderArticles with zero quantity and tolerance
This commit is contained in:
parent
ce0ee6773a
commit
25854f2de7
4 changed files with 22 additions and 7 deletions
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue