Fixes: 1) Correct UUID decoding to resolve invalid usage of urlsafe_base64_decode.
Extra: Removed unnecessary variable assignments for cleaner code.
This commit is contained in:
parent
5d8f528dfd
commit
e7bfa87e74
1 changed files with 1 additions and 3 deletions
|
|
@ -468,9 +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 = urlsafe_base64_decode(str(kwargs.get("encoded_uuid"))).decode("utf-8")
|
||||||
uuid_bytes = urlsafe_base64_decode(str(kwargs.get("encoded_uuid")))
|
|
||||||
uuid = str(uuid_module.UUID(bytes=uuid_bytes))
|
|
||||||
|
|
||||||
download = DigitalAssetDownload.objects.get(order_product__uuid=uuid)
|
download = DigitalAssetDownload.objects.get(order_product__uuid=uuid)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue