File indexing completed on 2026-06-26 08:40:25
0001 from django.db import migrations
0002
0003
0004 def fix_seed_created_by(apps, schema_editor):
0005 """The Background category (digit 6) and its no-signal physics tag (p6001)
0006 were seeded with created_by='seed' by migration 0010; every other category
0007 and tag is owned by 'wenaus'. Normalise the two so ownership reads
0008 consistently across the catalog."""
0009 for model_name in ('PhysicsCategory', 'PhysicsTag'):
0010 apps.get_model('pcs', model_name).objects.filter(
0011 created_by='seed'
0012 ).update(created_by='wenaus')
0013
0014
0015 class Migration(migrations.Migration):
0016
0017 dependencies = [
0018 ('pcs', '0012_unlock_all_tags_draft'),
0019 ]
0020
0021 operations = [
0022 migrations.RunPython(fix_seed_created_by, migrations.RunPython.noop),
0023 ]