Skip to content

Commit

Permalink
fix #59: cannot import name get_storage_class (Django 5.1)
Browse files Browse the repository at this point in the history
The `get_storage_class` function has been removed in Django 5.1

https://docs.djangoproject.com/en/5.1/releases/5.1/
  • Loading branch information
ecarrara committed Aug 21, 2024
1 parent 59c743c commit c07d7f7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions django_migrations_ci/management/commands/migrateci.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import logging
from pathlib import Path

from django.core.files.storage import get_storage_class
from django.core.management.base import BaseCommand, CommandError
from django.utils.module_loading import import_string

try:
from django.test.runner import get_max_test_processes # type: ignore[attr-defined]
Expand Down Expand Up @@ -71,8 +71,8 @@ def handle(
elif parallel is not None:
parallel = int(parallel)

storage_class = get_storage_class(storage_class)
default_storage_class = get_storage_class(
storage_class = import_string(storage_class or settings.DEFAULT_FILE_STORAGE)
default_storage_class = import_string(
"django.core.files.storage.FileSystemStorage",
)
if issubclass(storage_class, default_storage_class):
Expand Down

0 comments on commit c07d7f7

Please sign in to comment.