Skip to content

Commit

Permalink
remove extra azure filepath_to_uri call
Browse files Browse the repository at this point in the history
  • Loading branch information
pjsier committed Sep 13, 2021
1 parent 6b128eb commit 2384873
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions storages/backends/azure_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from django.core.files.base import File
from django.utils import timezone
from django.utils.deconstruct import deconstructible
from django.utils.encoding import filepath_to_uri, force_bytes
from django.utils.encoding import force_bytes

from storages.base import BaseStorage
from storages.utils import (
Expand Down Expand Up @@ -271,8 +271,7 @@ def url(self, name, expire=None):
expiry=self._expire_at(expire))
credential = sas_token

container_blob_url = self.client.get_blob_client(
filepath_to_uri(name)).url
container_blob_url = self.client.get_blob_client(name).url
return BlobClient.from_blob_url(container_blob_url, credential=credential).url

def _get_content_settings_parameters(self, name, content=None):
Expand Down

0 comments on commit 2384873

Please sign in to comment.