

def change_item(self, item_id, operation):
    product = Products().get_one(item_id)
    if product:
        if (operation == 'add'):
            self.items.append(product)
        elif (x == 'remove'):
            cart_product = filter((lambda x: (x['id'] == product['id'])), self.items)
            self.items.remove(cart_product[0])
        self.update()
        return True
    else:
        return False

dataset/ETHPy150Open rochacbruno/python-pagseguro/examples/flask/flask_seguro/cart.py Cart.change_item/VarMisuse@51/62 `operation`->`x`