Skip to content

Commit

Permalink
Revert "[s3] raise ImproperlyConfigured if no bucket name is set (#1313
Browse files Browse the repository at this point in the history
…)" (#1322)

This reverts commit 9eeb8c3.
  • Loading branch information
jschneier committed Oct 9, 2023
1 parent 37a40a6 commit c15d7b0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 7 deletions.
2 changes: 0 additions & 2 deletions storages/backends/s3.py
Expand Up @@ -288,8 +288,6 @@ def __init__(self, **settings):
super().__init__(**settings)

check_location(self)
if not self.bucket_name:
raise ImproperlyConfigured("Setting a bucket name is required.")

if (self.access_key or self.secret_key) and self.session_profile:
raise ImproperlyConfigured(
Expand Down
5 changes: 0 additions & 5 deletions tests/test_s3.py
Expand Up @@ -956,11 +956,6 @@ def test_auth_config(self):
access_key="foo", secret_key="boo", session_profile="moo"
)

def test_bucket_name_required(self):
with override_settings(AWS_STORAGE_BUCKET_NAME=None):
with self.assertRaises(ImproperlyConfigured):
s3.S3Storage()


class S3StaticStorageTests(TestCase):
def setUp(self):
Expand Down

0 comments on commit c15d7b0

Please sign in to comment.