1 # Generated by Django 4.1.9 on 2024-10-15 14:23
3 from django.db import migrations
6 def copy_slug_to_fk(apps, schema_editor):
7 cBook = apps.get_model('catalogue', 'Book')
8 dBook = apps.get_model('documents', 'Book')
10 for db in dBook.objects.all():
13 except cBook.DoesNotExist:
17 db.catalogue_book = cb
21 class Migration(migrations.Migration):
24 ("documents", "0018_book_catalogue_book_alter_book_catalogue_book_slug"),
30 migrations.RunPython.noop,