From b2c3508775826ecfd880c57c2c1ffdbc7d17b001 Mon Sep 17 00:00:00 2001 From: Michael Stewart Date: Tue, 19 Jul 2022 16:11:53 -0400 Subject: [PATCH] fix part types on newer activities --- .../0018_assign_part_type_to_assignment_20220617_2211.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/teleband/assignments/migrations/0018_assign_part_type_to_assignment_20220617_2211.py b/teleband/assignments/migrations/0018_assign_part_type_to_assignment_20220617_2211.py index 172be0e..67fc2d5 100644 --- a/teleband/assignments/migrations/0018_assign_part_type_to_assignment_20220617_2211.py +++ b/teleband/assignments/migrations/0018_assign_part_type_to_assignment_20220617_2211.py @@ -1,6 +1,5 @@ # Generated by Django 3.2.11 on 2022-06-18 02:11 -from math import comb from django.db import migrations @@ -10,9 +9,11 @@ def assign_part_type(apps, schema_editor): ActivityType = apps.get_model("assignments", "ActivityType") PartType = apps.get_model("musics", "PartType") combined_part_type = PartType.objects.get(name="Combined") - record = Activity.objects.get(activity_type=ActivityType.objects.get(name="Creativity"),).part_type=combined_part_type + record = Activity.objects.get(activity_type=ActivityType.objects.get(name="Creativity"),) + record.part_type=combined_part_type record.save() - record = Activity.objects.get(activity_type=ActivityType.objects.get(name="Reflection"),).part_type=combined_part_type + record = Activity.objects.get(activity_type=ActivityType.objects.get(name="Reflection"),) + record.part_type=combined_part_type record.save()