Hi.
So there will probably be an error in saving to the database.
You need to check the ps_stock_available table to find the product ID.
It should be there if the column id_product_attribute = 0 then quantity should be the sum of all id_product_attribute quantity.