Skip to content

Commit

Permalink
fix storages imports in Django 5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
PetrDlouhy committed May 21, 2024
1 parent 71885dd commit 733fc85
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion import_export_celery/fields.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
from django.conf import settings
from django.core.files.storage import get_storage_class, storages
from django.core.files.storage import storages
from django.db import models


def lazy_initialize_storage_class():
# If the user has specified a custom storage backend, use it.
if getattr(settings, "IMPORT_EXPORT_CELERY_STORAGE", None):
try:
from django.core.files.storage import get_storage_class
storage_class = get_storage_class(settings.IMPORT_EXPORT_CELERY_STORAGE)
return storage_class()
except (ImportError, TypeError):
Expand Down

0 comments on commit 733fc85

Please sign in to comment.