Skip to content

Commit

Permalink
enables passing security_token to constructor
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 16, 2023
1 parent 7914409 commit f5ad48d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions storages/backends/s3boto3.py
Original file line number Diff line number Diff line change
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 f5ad48d

Please sign in to comment.