Skip to content

Commit

Permalink
Merge pull request #106 from zachbellay/patch-1
Browse files Browse the repository at this point in the history
Fix: AttributeError if IMPORT_EXPORT_CELERY_STORAGE not defined
  • Loading branch information
Jaspreet-singh-1032 committed Aug 5, 2023
2 parents a08f82d + e7bc39c commit 86664b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion import_export_celery/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
class ImportExportFileField(models.FileField):
def __init__(self, *args, **kwargs):
# If the user has specified a custom storage backend, use it.
if settings.IMPORT_EXPORT_CELERY_STORAGE:
if getattr(settings, "IMPORT_EXPORT_CELERY_STORAGE", None):
storage_class = get_storage_class(settings.IMPORT_EXPORT_CELERY_STORAGE)
kwargs["storage"] = storage_class()

Expand Down

0 comments on commit 86664b3

Please sign in to comment.