idk
This commit is contained in:
@@ -38,7 +38,8 @@ class InventoryService:
|
||||
if inventory is None:
|
||||
inventory = Inventory(
|
||||
product_id=product.id,
|
||||
quantity=quantity
|
||||
quantity=quantity,
|
||||
warehouse_id="0f0d01b1-97ba-4ab2-9082-22062bca9b06" # TODO FIX
|
||||
)
|
||||
self.db.add(inventory)
|
||||
else:
|
||||
@@ -61,7 +62,7 @@ class InventoryService:
|
||||
"""
|
||||
try:
|
||||
with db_transaction(self.db):
|
||||
for product, quantity in product_data.items():
|
||||
for product, quantity in product_data.items(): # TODO BATCH THIS
|
||||
self.add_inventory(product, quantity)
|
||||
return UpdateInventoryResponse(success=True)
|
||||
except SQLAlchemyError:
|
||||
|
Reference in New Issue
Block a user