Fix a bug in convert_prices

Prevents actually finding any new prices
This commit is contained in:
Lukáš Kucharczyk 2025-03-22 13:45:44 +01:00
parent e0dfc0fc3e
commit 0ce59a8cc6
Signed by: lukas
SSH Key Fingerprint: SHA256:vMuSwvwAvcT6htVAioMP7rzzwMQNi3roESyhv+nAxeg
2 changed files with 2 additions and 2 deletions

View File

@ -212,7 +212,7 @@ class Purchase(models.Model):
or existing_purchase.price_currency != self.price_currency
):
self.converted_price = None
self.converted_currency = None
self.converted_currency = ""
super().save(*args, **kwargs)

View File

@ -22,7 +22,7 @@ def save_converted_info(purchase, converted_price, converted_currency):
def convert_prices():
purchases = Purchase.objects.filter(
converted_price__isnull=True, converted_currency__isnull=True
converted_price__isnull=True, converted_currency=""
)
for purchase in purchases: