Skip to content

Commit

Permalink
fix: Remove unused django-storages method. ref #1419
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Aug 27, 2024
1 parent 3e7f460 commit a33578f
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions lemarche/utils/s3boto.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from django.utils import timezone as tz
from django.utils.deconstruct import deconstructible
from django.utils.encoding import filepath_to_uri, force_bytes, force_str, smart_str
from storages.utils import check_location, clean_name, get_available_overwrite_name, lookup_env, safe_join, setting
from storages.utils import check_location, clean_name, lookup_env, safe_join, setting


try:
Expand Down Expand Up @@ -511,10 +511,3 @@ def url(self, name, headers=None, response_headers=None, expire=None):
force_http=not self.secure_urls,
response_headers=response_headers,
)

def get_available_name(self, name, max_length=None):
"""Overwrite existing file with the same name."""
name = self._clean_name(name)
if self.file_overwrite:
return get_available_overwrite_name(name, max_length)
return super(S3BotoStorage, self).get_available_name(name, max_length)

0 comments on commit a33578f

Please sign in to comment.