diff --git a/core/models.py b/core/models.py index 465f9868..3a9498b4 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 self.download: + if hasattr(self, download): return self.download.url else: return DigitalAssetDownload.objects.create(order_product=self).url