Fix a bug in convert_prices
Prevents actually finding any new prices
This commit is contained in:
parent
e0dfc0fc3e
commit
0ce59a8cc6
@ -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)
|
||||
|
||||
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user