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:
parent
b76c7889ac
commit
b542cbab11
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user