From 87aa87bc0f718e60ccf6f696fb106fa4b57da867 Mon Sep 17 00:00:00 2001 From: Arona Jones Date: Fri, 19 May 2023 10:47:50 +0000 Subject: [PATCH] Update 0046_create_powertests.py Don't try and find a nonexistent notes field on EventChecklist. --- RIGS/migrations/0046_create_powertests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RIGS/migrations/0046_create_powertests.py b/RIGS/migrations/0046_create_powertests.py index 95f1c8e4..12657b91 100644 --- a/RIGS/migrations/0046_create_powertests.py +++ b/RIGS/migrations/0046_create_powertests.py @@ -10,7 +10,7 @@ def migrate_old_data(apps, schema_editor): PowerTestRecord = apps.get_model('RIGS', 'PowerTestRecord') for ec in EventChecklist.objects.all(): # New highscore for the most pythonic BS I've ever written. - PowerTestRecord.objects.create(event=ec.event, **{i.name:getattr(ec, i.attname) for i in PowerTestRecord._meta.get_fields() if not (i.is_relation or i.auto_created)}) + PowerTestRecord.objects.create(event=ec.event, **{i.name:getattr(ec, i.attname) for i in PowerTestRecord._meta.get_fields() if not (i.is_relation or i.auto_created or i.name == "notes")}) def revert(apps, schema_editor):