Open shanirub opened 4 months ago
price field in Product model is defined as price = models.DecimalField(max_digits=10, decimal_places=2, validators=[MinValueValidator(0)])
price = models.DecimalField(max_digits=10, decimal_places=2, validators=[MinValueValidator(0)])
currently works only with Decimal objects for assignment and comparison.
save()
__eq__
other
price field in Product model is defined as
price = models.DecimalField(max_digits=10, decimal_places=2, validators=[MinValueValidator(0)])
currently works only with Decimal objects for assignment and comparison.
save()
to handle str/Decimal/float assignment__eq__
(and other comparison dunder methods) to handle str/Decimal/float asother