@@ -222,8 +222,7 @@ def get_env_setting(setting):
222222# we need to run asset collection twice, once for local disk and once for S3.
223223# Once we have migrated to service assets off S3, then we can convert this back to
224224# managed by the yaml file contents
225- STORAGES ['staticfiles' ]['BACKEND' ] = os .environ .get (
226- 'STATICFILES_STORAGE' , STORAGES ['staticfiles' ]['BACKEND' ])
225+ STATICFILES_STORAGE = os .environ .get ('STATICFILES_STORAGE' , STATICFILES_STORAGE )
227226CSRF_TRUSTED_ORIGINS = _YAML_TOKENS .get ("CSRF_TRUSTED_ORIGINS" , [])
228227
229228MKTG_URL_LINK_MAP .update (_YAML_TOKENS .get ('MKTG_URL_LINK_MAP' , {}))
@@ -266,19 +265,19 @@ def get_env_setting(setting):
266265
267266# Change to S3Boto3 if we haven't specified another default storage AND we have specified AWS creds.
268267if (not _YAML_TOKENS .get ('DEFAULT_FILE_STORAGE' )) and AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY :
269- STORAGES [ "default" ][ "BACKEND" ] = 'storages.backends.s3boto3.S3Boto3Storage'
268+ DEFAULT_FILE_STORAGE = 'storages.backends.s3boto3.S3Boto3Storage'
270269
271270if COURSE_IMPORT_EXPORT_BUCKET :
272271 COURSE_IMPORT_EXPORT_STORAGE = 'cms.djangoapps.contentstore.storage.ImportExportS3Storage'
273272else :
274- COURSE_IMPORT_EXPORT_STORAGE = STORAGES [ "default" ][ "BACKEND" ]
273+ COURSE_IMPORT_EXPORT_STORAGE = DEFAULT_FILE_STORAGE
275274
276275USER_TASKS_ARTIFACT_STORAGE = COURSE_IMPORT_EXPORT_STORAGE
277276
278277if COURSE_METADATA_EXPORT_BUCKET :
279278 COURSE_METADATA_EXPORT_STORAGE = 'cms.djangoapps.export_course_metadata.storage.CourseMetadataExportS3Storage'
280279else :
281- COURSE_METADATA_EXPORT_STORAGE = STORAGES [ "default" ][ "BACKEND" ]
280+ COURSE_METADATA_EXPORT_STORAGE = DEFAULT_FILE_STORAGE
282281
283282# The normal database user does not have enough permissions to run migrations.
284283# Migrations are run with separate credentials, given as DB_MIGRATION_*
0 commit comments