Skip to content

Commit

Permalink
[s3] enable passing security_token to constructor (#1246)
Browse files Browse the repository at this point in the history
Without this line, `BaseStorage.__init__` raises an `ImproperlyConfigured`
exception which prevents passing security_token as a parameter to
`S3Boto3Storage.__init__`.
  • Loading branch information
smirolo committed May 18, 2023
1 parent 7914409 commit cdad67b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions storages/backends/s3boto3.py
Expand Up @@ -306,6 +306,7 @@ def get_default_settings(self):
return {
'access_key': setting('AWS_S3_ACCESS_KEY_ID', setting('AWS_ACCESS_KEY_ID')),
'secret_key': setting('AWS_S3_SECRET_ACCESS_KEY', setting('AWS_SECRET_ACCESS_KEY')),
'security_token': setting('AWS_SESSION_TOKEN', setting('AWS_SECURITY_TOKEN')),
'session_profile': setting('AWS_S3_SESSION_PROFILE'),
'file_overwrite': setting('AWS_S3_FILE_OVERWRITE', True),
'object_parameters': setting('AWS_S3_OBJECT_PARAMETERS', {}),
Expand Down

0 comments on commit cdad67b

Please sign in to comment.