1 # Generated by Django 4.0.8 on 2024-09-18 11:29
3 from django.db import migrations, models
4 from django.db.models.functions import Concat
7 def update_anchor(apps, schema_editor):
8 Occurence = apps.get_model('references', 'Occurence')
9 Occurence.objects.filter(anchor='').update(
10 anchor=Concat(models.Value('sec'), 'section')
14 class Migration(migrations.Migration):
17 ('references', '0003_occurence_anchor'),
21 migrations.RunPython(update_anchor, migrations.RunPython.noop)