diff --git a/core/management/commands/fix_prices.py b/core/management/commands/fix_prices.py index 5d3c1dab..2ecadc6d 100644 --- a/core/management/commands/fix_prices.py +++ b/core/management/commands/fix_prices.py @@ -13,7 +13,7 @@ class Command(BaseCommand): self.stdout.write(self.style.SUCCESS("Starting fixing stocks' prices...")) for product in Product.objects.filter(stocks__isnull=False): - for stock in product.stocks: + for stock in product.stocks.all(): try: stock.price = AbstractVendor.round_price_marketologically(stock.price) stock.save()