Merge pull request #3700 from betagouv/frederic/fix_pj_migration_for_production_env
[#2180] Handle additionnal wrapping layer in production
This commit is contained in:
commit
f05a052674
1 changed files with 5 additions and 0 deletions
|
@ -17,6 +17,11 @@ class CarrierwaveActiveStorageMigrationService
|
|||
def active_storage_openstack_client!
|
||||
service = ActiveStorage::Blob.service
|
||||
|
||||
if defined?(ActiveStorage::Service::DsProxyService) &&
|
||||
service.is_a?(ActiveStorage::Service::DsProxyService)
|
||||
service = service.wrapped
|
||||
end
|
||||
|
||||
if !defined?(ActiveStorage::Service::OpenStackService) ||
|
||||
!service.is_a?(ActiveStorage::Service::OpenStackService)
|
||||
raise StandardError, 'ActiveStorage must be backed by OpenStack'
|
||||
|
|
Loading…
Reference in a new issue