Skip to content

Commit

Permalink
Don't use template product price, use the one from the original produ…
Browse files Browse the repository at this point in the history
…ct instead
  • Loading branch information
bruecksen committed Nov 8, 2024
1 parent 15854d5 commit 5e05065
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bakeup/shop/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -665,8 +665,8 @@ def __str__(self):
return "{}x {}".format(self.quantity, self.product)

def save(self, *args, **kwargs):
if not self.price and self.product.sale_price:
self.price = self.product.sale_price.price.amount
if not self.price and self.get_product().sale_price:
self.price = self.get_product().sale_price.price.amount
if self.price and self.quantity:
self.price_total = self.price * self.quantity
super().save(*args, **kwargs)
Expand Down

0 comments on commit 5e05065

Please sign in to comment.