def GET(self, resource, context): cart = ProductCart(context) if cart.get_nb_products() <= 0: return return STLView.GET(self, resource, context)