1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-18 07:52:23 +01:00

(bug) can't save product's price < 1

This commit is contained in:
Du Peng 2022-09-13 16:56:36 +02:00
parent b76c7889ac
commit b542cbab11

View File

@ -18,7 +18,7 @@ class API::ProductsController < API::ApiController
def create
authorize Product
@product = Product.new(product_params)
@product.amount = ProductService.amount_multiplied_by_hundred(@product.amount)
@product.amount = ProductService.amount_multiplied_by_hundred(product_params[:amount])
if @product.save
render status: :created
else