Fixes: 1) Ensure encoded_uuid is cast to string before decoding to avoid potential errors;

Extra: None;
This commit is contained in:
Egor Pavlovich Gorbunov 2025-07-29 22:24:46 +03:00
parent 25b1064c37
commit 7f8ab0de88

View file

@ -468,7 +468,7 @@ def download_digital_asset_view(request, *args, **kwargs):
a JsonResponse with an error message if an error occurs during the process. a JsonResponse with an error message if an error occurs during the process.
""" """
try: try:
uuid = force_str(urlsafe_base64_decode(kwargs.get("encoded_uuid"))) uuid = force_str(urlsafe_base64_decode(str(kwargs.get("encoded_uuid"))))
download = DigitalAssetDownload.objects.get(order_product__uuid=uuid) download = DigitalAssetDownload.objects.get(order_product__uuid=uuid)
if download.num_downloads >= 1: if download.num_downloads >= 1: