Skip to content

Commit

Permalink
levels: fix downloading levels from s3
Browse files Browse the repository at this point in the history
  • Loading branch information
rr- committed Aug 8, 2023
1 parent a9796f7 commit c4307b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/trcustoms/levels/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from rest_framework.generics import get_object_or_404
from rest_framework.permissions import AllowAny
from rest_framework.response import Response
from storages.utils import clean_name

from trcustoms.common.serializers import EmptySerializer
from trcustoms.levels.filters import filter_levels_queryset
Expand Down Expand Up @@ -186,7 +187,7 @@ def download(self, request, pk: int) -> Response:
Params={
"Bucket": file_field.storage.bucket_name,
"Key": file_field.storage._normalize_name(
file_field.storage._clean_name(file_field.name)
clean_name(file_field.name)
),
**parameters,
},
Expand Down

0 comments on commit c4307b3

Please sign in to comment.