def change_item(self, item_id, operation):
product = Products().get_one(item_id)<EOL>if product:<EOL><INDENT>if operation == '<STR_LIT>':<EOL><INDENT>self.items.append(product)<EOL><DEDENT>elif operation == '<STR_LIT>':<EOL><INDENT>cart_p = [x for x in self.items if x['<STR_LIT:id>'] == product['<STR_LIT:id>']]<EOL>self.items.remove(cart_p[<NUM_LIT:0>])<EOL><DEDENT>self.update()<EOL>return True<EOL><DEDENT>else:<EOL><INDENT>return False<EOL><DEDENT>
Remove items in cart