[Fixed]-Unsupported operand type(s) for -=: 'str' and 'int'

1👍

The error message means that articulo.stock is inadvertently assigned a str instead of a number.

In the model, stock is defined as a CharField. Probably, it should be some numeric type such as IntegerField().

Leave a comment