@@ -28,7 +28,7 @@ async def _reserve_products(context: SagaContext) -> Model:
2828 product_uuids = [context ["product_uuid" ]]
2929 cart_id = context ["cart_id" ]
3030 quantities = defaultdict (int )
31- cart = await Cart .get_one (cart_id )
31+ cart = await Cart .get (cart_id )
3232 for product_id in product_uuids :
3333 quantities [str (product_id )] += get_product_quantity (cart , product_id )
3434
@@ -39,7 +39,7 @@ async def _release_products(context: SagaContext) -> Model:
3939 product_uuids = [context ["product_uuid" ]]
4040 cart_id = context ["cart_id" ]
4141 quantities = defaultdict (int )
42- cart = await Cart .get_one (cart_id )
42+ cart = await Cart .get (cart_id )
4343 for product_id in product_uuids :
4444 quantities [str (product_id )] -= get_product_quantity (cart , product_id )
4545
@@ -49,7 +49,7 @@ async def _release_products(context: SagaContext) -> Model:
4949async def _remove_cart_item (context : SagaContext ) -> SagaContext :
5050 cart_id = context ["cart_id" ]
5151 product = context ["product" ]
52- cart = await Cart .get_one (cart_id )
52+ cart = await Cart .get (cart_id )
5353 cart .entries .discard (product )
5454
5555 await cart .save ()
0 commit comments