1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-03-21 12:29:03 +01:00

(bug) save double product image when creation of product

This commit is contained in:
Du Peng 2022-09-19 19:09:54 +02:00
parent b5ffae1fb6
commit 906931f40f

View File

@ -55,7 +55,8 @@ class ProductService
def create(product_params, stock_movement_params = [])
product = Product.new(product_params)
product.amount = amount_multiplied_by_hundred(product_params[:amount])
update(product, product_params, stock_movement_params)
update_stock(product, stock_movement_params)
product
end
def update(product, product_params, stock_movement_params = [])