mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 05:22:16 +00:00
Update 0046_create_powertests.py
Don't try and find a nonexistent notes field on EventChecklist.
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user