From 0ce59a8cc656d7bd910e13ea3afa92c06e718858 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Sat, 22 Mar 2025 13:45:44 +0100 Subject: [PATCH] Fix a bug in convert_prices Prevents actually finding any new prices --- games/models.py | 2 +- games/tasks.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/games/models.py b/games/models.py index 792e8fb..5132354 100644 --- a/games/models.py +++ b/games/models.py @@ -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) diff --git a/games/tasks.py b/games/tasks.py index 3c960ec..4ac21fb 100644 --- a/games/tasks.py +++ b/games/tasks.py @@ -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: