From c12bb67f00eea9d8bcef82c7c58d56c644010bce Mon Sep 17 00:00:00 2001 From: Taynara Date: Thu, 15 Apr 2021 15:06:42 -0300 Subject: [PATCH] remove os comentarios do try --- app/src/controllers/carts.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/controllers/carts.py b/app/src/controllers/carts.py index 33f086b..cf740ea 100644 --- a/app/src/controllers/carts.py +++ b/app/src/controllers/carts.py @@ -30,7 +30,7 @@ def list_all_carts(): @app.route('/cart/') def list_cart_by_session(session_id): - # try: + try: obj = [{ "session_id": session_id, "cupom_apply": Carts.get_cupom(session_id), @@ -40,8 +40,8 @@ def list_cart_by_session(session_id): "products": json.loads(Carts.get_cart_product(session_id)) }] return jsonify({'Carts': obj }) - # except: - # return jsonify({'code': 404, 'message': f'carrinho {session_id} não encontrado' }), 404 + except: + return jsonify({'code': 404, 'message': f'carrinho {session_id} não encontrado' }), 404 @app.route('/cart/', methods=['POST']) def created_cart(session_id):