Skip to content

Commit 06cd844

Browse files
authored
Fix: bad migration. (#1682)
1 parent 8e27b66 commit 06cd844

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

libraries/migrations/0020_repopulate_slug_20240325_1616.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
from django.db import migrations
22
from django.utils.text import slugify
33

4-
from libraries.models import Library
5-
64

75
def migrate_to_key_slug(apps, schema_editor):
86
"""Migrate the key to the slug field."""
7+
Library = apps.get_model('libraries', 'Library')
98

109
for library in Library.objects.all():
1110
library.slug = slugify(library.key)

0 commit comments

Comments
 (0)