From 58e1390d4ddd1dd6c9b4bf08c085de1ac4279642 Mon Sep 17 00:00:00 2001 From: Egor fureunoir Gorbunov Date: Fri, 3 Oct 2025 17:38:18 +0300 Subject: [PATCH] Fixes: 1) Correct string argument in `hasattr` call within `download_url` method. --- core/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/models.py b/core/models.py index 3a9498b4..fe3deb77 100644 --- a/core/models.py +++ b/core/models.py @@ -1784,7 +1784,7 @@ class OrderProduct(ExportModelOperationsMixin("order_product"), NiceModel): # t def download_url(self: Self) -> str: if self.product and self.product.stocks: if self.product.is_digital and self.product.stocks.first().digital_asset: # type: ignore [union-attr] - if hasattr(self, download): + if hasattr(self, "download"): return self.download.url else: return DigitalAssetDownload.objects.create(order_product=self).url