From a33578f1d4916a388fe11ed12524708ec757976c Mon Sep 17 00:00:00 2001 From: Raphael Odini Date: Tue, 27 Aug 2024 17:23:02 +0200 Subject: [PATCH] fix: Remove unused django-storages method. ref #1419 --- lemarche/utils/s3boto.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/lemarche/utils/s3boto.py b/lemarche/utils/s3boto.py index c42aadabc..645559435 100644 --- a/lemarche/utils/s3boto.py +++ b/lemarche/utils/s3boto.py @@ -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: @@ -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)